[antlr-interest] catching custom exceptions thrown from actions

Felix Dorner felix_do at web.de
Fri Mar 28 11:30:53 PDT 2008


Hey,

when one of the methods called in an Action throws an Exception, I catch 
this with
..
;
catch [MyCustomException]{...}

but then the usually inserted

catch (RecognitionException e)
..
}

gets lost. So every time I catch a custom Exception do I also need to 
insert a catch for the RecognitionException, if I want to preserve the 
default behavior:

catch[MyCustomException e] { ... }
catch[RecognitionException e] { //manually insert what antlr would 
otherwise do himself???; }


I'm lost..
Felix




More information about the antlr-interest mailing list