lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject RE: QueryParser.parse javadoc
Date Mon, 25 Feb 2002 20:13:33 GMT
Since Brian and Scott are the local experts on the subject and the main
authors of QueryParse.jj maybe they can shed some light on this issue?

Thanks,
Otis

--- Daniel Calvo <dcalvo@task.com.br> wrote:
> Hi Geir,
> 
> TokenMgrError is thrown by JavaCC. In a previous message, I've
> suggested catching it and rethrowing as a ParseException but nobody
> seemed to agree so I changed my suggestion to include it in the
> javadoc. In my particular case, I catch TokenMgrError and handle it
> like I do with ParseException and I don't have any problem with that.
> 
> --Daniel
> 
> > -----Original Message-----
> > From: Geir Ove Grønmo [mailto:grove@ontopia.net]
> > Sent: segunda-feira, 25 de fevereiro de 2002 08:09
> > To: Lucene Developers List
> > Subject: Re: QueryParser.parse javadoc
> >
> >
> > * 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:
> >
> > http://java.sun.com/j2se/1.3/docs/api/java/lang/Error.html
> >
> > 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:  
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:lucene-dev-help@jakarta.apache.org>
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-dev-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message