common : reject out-of-range grammar_triggers type instead of aborting (#30835) (#31478)

* common : reject out-of-range grammar_triggers type instead of aborting (#30835)

* tests : remove the invalid grammar trigger type regression test (#30835)
This commit is contained in:
IsNot authored and GitHub committed 2026-11-15 00:32:37 +01:00
1 parent cf9a9957da
commit 9f26fe11c7
1 file changed
+2 -1
+2 -1
View File
@@ -255,7 +255,8 @@ struct common_sampler * common_sampler_init(
break;
}
default:
GGML_ASSERT(false && "unknown trigger type");
throw std::runtime_error(
"unknown grammar trigger type: " + std::to_string(trigger.type));
}
}