5.2.7. Error Handling¶
Spicy’s error handling remains quite limited at this point, with more to come here in the future.
Exceptions provide Spicy’s primary mechanism for reporting errors.
Currently, various parts of the runtime system throw exceptions if
they encounter unexpected situations. In particular, the generated
ParsingError exceptions if they find themselves
unable to comprehend their input. However, the support for catching
and handling exception is remains minimal at the moment. For now, only
ParsingError exceptions can be caught indirectly through the
%on_error unit hook, which internally is nothing
else than an exception handler.
Spicy doesn’t have
error yet (#90).
The earlier Spicy prototype had support for resynchronizing parsers with their input stream after parse error. It’s on the list to bring that back (#23).