lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Why does BooleanQuery$TooManyClauses extend RuntimeException?
Date Wed, 26 Nov 2003 13:28:10 GMT
On Wednesday, November 26, 2003, at 07:21  AM, Otis Gospodnetic wrote:
> Would a better solution then be to just change the TMC exception to be
> a checked one?  (I don't quite like this either, as it forces me to use
> try/catch blocks, even if I choose not to do anything to handle this
> exception, but....)

I still think a single checked exception coming from the parse method 
is desirable, with the only runtime ones coming from actual bugs in the 
Lucene code or other completely unexpected events like "out of memory". 
  A TooManClauses exception is not unexpected, per se.

I view ParseException as a "QueryParserException" and it means that 
QueryParser was unable to do its job and convert the expression into a 
valid query.

My preference is to throw a ParseException instead of letting a 
TooManyClauses exception bubble out.  Changing it to be a checked 
exception would break folks not already catching it - but if it was 
only added since 1.2 final then it is probably ok to make it checked.  
Again, my preference is to leave it as it is in CVS currently, but if 
if the consensus is to change it somehow I'm ok with that as well.

	Erik


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


Mime
View raw message