You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2009/10/17 22:02:21 UTC

svn commit: r826302 - in /lucene/lucy/trunk/core/Lucy/Store: FileHandle.bp FileHandle.c

Author: marvin
Date: Sat Oct 17 20:02:21 2009
New Revision: 826302

URL: http://svn.apache.org/viewvc?rev=826302&view=rev
Log:
Ignore return value from Close() during FileHandle's Destroy(), rather than
throw an exception.

Modified:
    lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp
    lucene/lucy/trunk/core/Lucy/Store/FileHandle.c

Modified: lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp?rev=826302&r1=826301&r2=826302&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp (original)
+++ lucene/lucy/trunk/core/Lucy/Store/FileHandle.bp Sat Oct 17 20:02:21 2009
@@ -121,7 +121,7 @@
     void
     VSetF_Error(FileHandle *self, const char *pattern, va_list args);
 
-    /** Invokes Close(). 
+    /** Invokes Close(), but ignores whether it succeeds or fails.
      */
     public void
     Destroy(FileHandle *self);

Modified: lucene/lucy/trunk/core/Lucy/Store/FileHandle.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Store/FileHandle.c?rev=826302&r1=826301&r2=826302&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Store/FileHandle.c (original)
+++ lucene/lucy/trunk/core/Lucy/Store/FileHandle.c Sat Oct 17 20:02:21 2009
@@ -24,20 +24,13 @@
 void
 FH_destroy(FileHandle *self)
 {
-    bool_t success = FH_Close(self);
-    CharBuf *error  = NULL;
-    if (!success) {
-        error = CB_Clone(self->error);
-    }
-
-    /* Decrement count of FileHandle objects in existence. */
-    FH_object_count--;
-
+    FH_Close(self);
     DECREF(self->path);
     DECREF(self->error);
     SUPER_DESTROY(self, FILEHANDLE);
 
-    if (!success) { Err_throw_mess(ERR, error); }
+    /* Decrement count of FileHandle objects in existence. */
+    FH_object_count--;
 }
 
 void