[stringtemplate-interest] which ST errors are serious

Terence Parr parrt at cs.usfca.edu
Tue Dec 1 10:20:24 PST 2009


you can make your own listener and it will talk to your app as it  
likes :)
Ter
On Dec 1, 2009, at 12:09 AM, Scott Waye wrote:

> Would it be possible to have a mode where errors where notified and  
> the notifyee(?) can supply the value to use?
>
> --
> Scott
>
>
> Sent from my HTC
>
> ----- Reply message -----
> From: "Terence Parr" <parrt at cs.usfca.edu>
> Date: Tue, Dec 1, 2009 01:16
> Subject: [stringtemplate-interest] which ST errors are serious
> To: "stringtemplate-interest at antlr.org List" <stringtemplate-interest at antlr.org 
> >
>
> hiya. finished gui prototype. racing to finish ST v4 alpha as Jim  
> Idle finishes v3-izing ANTLR v3. then I can hook it in to test.
>
> One major thing left: what to do with "errors."  E.g., what should  
> happen when you ref a template that doesn't exist?  Now in v4, i  
> emit an error to a listener (which u can set) and use a blank ST. My  
> goal will always be to proceed with a reasonable response, even upon  
> error.   another example: <a.b>.  What if object 'a' does not have a  
> 'b' property?  It seems like I should just keep going and pretend  
> that the value doesn't exist like I do when you reference <a> and  
> 'a' doesn't exist.
>
> But, what should I do with the error notification? Should I just  
> always emit an error to the listener and let you ignore what you  
> don't care about? Currently in v3, the problem is that I spew stack  
> trace to stderr when I find a problem with <a.b> and so on. ugly.
>
> I do have a prototype of something called ErrorTolerance that lets  
> you indicate what errors you care about. If you want to play loose,  
> ST won't tell you about any errors unless they are things like  
> "can't write file".  But, for language execution errors, you have a  
> choice about what to hear about. Does that make sense? By default, I  
> guess, you would want to hear about unknown templates and weird  
> template names like "f x.e \".
>
> ErrorTolerance.detect(
>        DETECT_UNKNOWN_TEMPLATE |
>        DETECT_MALFORMED_TEMPLATE_NAME
> );
>
> Does that make sense? now is the time to tell me about what you hate  
> about current error handling :)
>
> Ter
>
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091201/dc3c9133/attachment.html 


More information about the stringtemplate-interest mailing list