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 Thu, 27 Nov 2003 10:32:14 GMT
On Wednesday, November 26, 2003, at 10:15  PM, Scott ganyo wrote:
> Sorry, I should have been more clear.  I really believe that the best 
> option is to have TooManyClauses Exception be changed to subclass 
> Exception directly.  This makes it explicit that prior assumptions 
> about the operation of the BooleanQuery are no longer valid and would 
> force developers to recognize that fact when they compile against the 
> new version of the library.  Yes, I understand that this may be a PITA 
> (pain-in-the-...) to some folks but again, I'd rather have a concrete, 
> immediate compile failure rather than a hidden runtime failure.  (The 
> same kind of reason I prefer using a strongly-typed language...)

But, as Doug mentioned, the effect of doing so is quite dramatic.  All 
of Lucene's operations throw an IOException currently - so adding a 
checked exception would require it be dealt with in a vastly different 
way somehow.

So, with that in mind - do you still propose making it a checked 
exception?

In the long run (Lucene 2.0?!), perhaps a LuceneException could be 
thrown from all operations which could wrap nested IOExceptions and any 
other checked exceptions that might come along in the future.  But for 
a 1.3 release, I think running with what is there is best.

	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