[stringtemplate-interest] which ST errors are serious
Terence Parr
parrt at cs.usfca.edu
Tue Dec 1 10:22:28 PST 2009
On Dec 1, 2009, at 7:55 AM, Brain, Jim wrote:
> If you have a listener concept in v4 and will pass the errors to the
> listener, it seems to me that someone who needs Exceptions can just
> throw the exception in the listener.
That's true. they can decide what's fatal. i'll have to pass more info
to the listener this way though and can't manage a bitset of what to
pay attention to.
> Is it common in systems to have a "conditional Exception system"
> like this, where the same conditions may or may not throw Exceptions
> depending on some configuration setting? If so, I'm unfamiliar with
> it. From a language perspective, I much prefer Exceptions either be
> "always" or "never", not "optional"
Well, in many ways it's a way to specify language semantics depending
on your situation. Some rely on <a.b> being valid when b doesn't
exist. Some people consider it a programming error. Both use cases
are valid.
As u say, maybe pass everything to listener and it can decide...
Ter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091201/a3fa96c8/attachment.html
More information about the stringtemplate-interest
mailing list