During a string validation, I receive this message "line 1:20 extraneous
input 'f' expecting ASA" in the console. This is printed by the
"getErrorMessage" function, initiated by the "match" function. I understanrd
why this message is displayed.
My problem is that I want to catch the error generated by the parser. I
include this code in my .g:
@rulecatch {
catch ( RecognitionException testing ) {
throw testing;
}
}
I also include a try/catch block in my Java code that use my parser, to
catch the RecognitionException exception. However, it never catch it. So, my
program is unable to know if the validation succeed or not.
What I am missing?
--
View this message in context:
http://antlr.1301665.n2.nabble.com/How-catch-exception-when-extraneous-input-happens-tp5163385p5163385.html
Sent from the ANTLR mailing list archive at Nabble.com.
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.