lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-793) Javadocs should explain possible causes for IOExceptions
Date Fri, 16 Feb 2007 19:01:08 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael McCandless updated LUCENE-793:
--------------------------------------

    Attachment: LUCENE-793.patch


OK I created 3 subclasses of IOException:

  org.apache.lucene.store.LockObtainFailedException
  org.apache.lucene.index.CorruptIndexException
  org.apache.lucene.index.StaleReaderException

and then changed most places where we throw a newly created
IOException to instead throw one of these.  We still throw an
IOException for low-level errors (eg "can't read directory" or "can't
find segments_N file").

I updated javadocs to reflect these changes.

Other small changes:

  * Fixed IndexReader to throw IOException if you try to
    delete/setNorm/undeleteAll after the reader is closed (it wasn't
    previously).  Added unit test for this.

  * Fixed one respelling in private method (aquireWriteLock ->
    acquireWriteLock)

  * Changed some places where we were throwing IllegalStateException
    to throw CorruptIndexException instead

  * Fixed some javadoc warnings



> Javadocs should explain possible causes for IOExceptions
> --------------------------------------------------------
>
>                 Key: LUCENE-793
>                 URL: https://issues.apache.org/jira/browse/LUCENE-793
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Javadocs
>            Reporter: Michael McCandless
>         Assigned To: Michael McCandless
>            Priority: Minor
>         Attachments: LUCENE-793.patch
>
>
> Most methods in Lucene reserve the right to throw an IOException.  This can occur for
nearly all methods from low level problems like wrong permissions, transient IO errors, bad
hard drive or corrupted file system, corrupted index, etc, but for some methods there are
also more interesting causes that we should try to document.
> Spinoff of this thread:
>     http://www.gossamer-threads.com/lists/lucene/java-user/44929

-- 
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