On Wed, Oct 28, 2009 at 7:53 AM, Michael McCandless
<luc...@mikemccandless.com> wrote:
> As a followon to LUCENE-1573, we had stated that in 3.0 instead of
> throwing RuntimeException when a Thread inside Lucene is interrupted,
> we would throw InterruptedException.
>
> Do we want to do this?  Technically I think it's the right thing to
> do, but, I started to implement it and found that it basically results
> in nearly every API now throwing InterruptedException (just like
> IOException).
>
> Thoughts?

One should not get an interrupted exception unless one specifically
interrupts the thread with the IndexWriter.
For the casual user, it doesn't seem useful to burden them with
InterruptedException, esp since they would normally not be able to
deal with it in a satisfactory manner anyway.
For an advanced user having a specific exception type could be
useful... so InterruptedRuntimeException?  Or should it be a subclass
of IOException so it will be handled by the catch blocks already in
the users code?

-Yonik
http://www.lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to