lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott ganyo <>
Subject Re: Why does BooleanQuery$TooManyClauses extend RuntimeException?
Date Thu, 27 Nov 2003 03:15:36 GMT
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...)


On Nov 26, 2003, at 5:08 PM, Doug Cutting wrote:

> Scott ganyo wrote:
>> I have always been rather troubled by this Exception.  The truth is 
>> that by imposing a limitation where there was none before, this 
>> change is already an incompatible change to the existing API.  Hiding 
>> the fact that the original contract has been broken by using a 
>> RuntimeException to slip past the compiler seems rather wrong to me.  
>> At least if the Exception was explicit, users could choose to address 
>> it or ignore it immediately when they compile... rather than being 
>> bit by it inadvertently at runtime.
> So what do you propose?
> Doug

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

View raw message