lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2053) When thread is interrupted we should throw a clear exception
Date Thu, 12 Nov 2009 12:37:39 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776973#action_12776973
] 

Uwe Schindler commented on LUCENE-2053:
---------------------------------------

Here are some names for Exceptions:

- UnexpectedInterruptException extends RuntimeException
- IndexerInterruptedException extends RuntimeException
- IndexWriterInterruptedException extends RuntimeException
- SmartInterruptedException (just a joke)

Another possibility would be to use IOException as super class, this would enable users to
catch it without changing code and they will correctly log the message and not fallback to
default RuntimeException catch in JVM.

The patch is easy, you have to just find all Thread.interrupt() calls or catch InterruptedException
in the code.

> When thread is interrupted we should throw a clear exception
> ------------------------------------------------------------
>
>                 Key: LUCENE-2053
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2053
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.0
>
>
> This is the 3.0 followon from LUCENE-1573.  We should throw a dedicated exception, not
just RuntimeException.
> Recent discussion from java-dev "Thread.interrupt()" subject: http://www.lucidimagination.com/search/document/8423f9f0b085034e/thread_interrupt

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message