Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there a way to to collect the parser-generated errors and use them later on in my script?

collect errors later Script
0
Posted

Is there a way to to collect the parser-generated errors and use them later on in my script?

0

• Answer by Damian There’s no “official” way (yet). A future release will allow you to create pluggable OO error handlers. At the moment the best you can do is: startrule: try_this | try_that | try_the_other | { ::do_something_with( $thisparser->{errors} ) } $thisparser->{errors} will contain a reference to an array-of-arrays, where each inner array contains the error message and the line number it occurred at.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123