parsley icon indicating copy to clipboard operation
parsley copied to clipboard

Better crash diagnostics

Open j-mie6 opened this issue 4 months ago • 0 comments

Occasionally, parsley can throw an error from within an instruction execution. There are three main sources for this to occur within:

  • An error within a user-defined function called from inside a parser
  • An out of scope reference being polled after unsafe initialisation
  • A legitimate bug in parsley

It would be good to try and distinguish between these, where possible, and catch any exceptions generated within the parser. These can be rethrown from outside the parsing context, removing any noise for user-made errors, report likely causes from undefined behaviour within parsley, and otherwise provide a more useful and detailed diagnostic for me that can be used in a bug report.

j-mie6 avatar Apr 05 '24 11:04 j-mie6