lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Ove Grønmo <>
Subject Re: QueryParser.parse javadoc
Date Mon, 25 Feb 2002 11:08:37 GMT
* Otis Gospodnetic
| I finally had the chance/had to look at QueryParser.jj.
| I see what you are talking about.
| I'll add TokenMgrError to the throws clause (I don't know JavaCC that
| well, so please let me know if this is wrong) and to the Javadoc.

Why is a subclass of java.lang.Error thrown? Isn't it better to throw an
Exception instead? An Error signals that this is a _very_ serious
problem and applications should generally not try to catch it. See:

It would be much better to catch the error inside the query parser and
rethrow it as a ParseException.

Geir O.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message