If you pass an invalid schema to Grammar::from_json_schema, a c++ exception is thrown, which isn't caught by the xgrammar-rs bindings, and causes the rust process to exit.
An example output:
libc++abi: terminating due to uncaught exception of type xgrammar::LogFatalError: [12:33:08] .../cpp/json_schema_converter.cc:2181: minItems is greater than the number of prefixItems, but additional items are not allowed: 2 > 0
It would be nice to return a Result, so that rust can continue execution.
If you pass an invalid schema to
Grammar::from_json_schema, a c++ exception is thrown, which isn't caught by thexgrammar-rsbindings, and causes the rust process to exit.An example output:
It would be nice to return a
Result, so that rust can continue execution.