jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r678414 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
Date Mon, 21 Jul 2008 13:56:19 GMT
Author: jukka
Date: Mon Jul 21 06:56:18 2008
New Revision: 678414

URL: http://svn.apache.org/viewvc?rev=678414&view=rev
Log:
JCR-1686: Catch Throwables while calling TextExtractors

Catch Throwables instead of Exceptions, as suggested by Claus Köll. Also, I merged the separate
warn and debug log entries into a single warning that contains he exception. That should be
easier for structured log readers (related information is  not spread over multiple log entries)
and it's easy enough for users to disable the exception stack traces for NodeIndexer warnings
if they're too verbose.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java?rev=678414&r1=678413&r2=678414&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
Mon Jul 21 06:56:18 2008
@@ -404,10 +404,9 @@
                 Reader reader = extractor.extractText(stream, type, encoding);
                 doc.add(createFulltextField(reader));
             }
-        } catch (Exception e) {
+        } catch (Throwable t) {
             // TODO: How to recover from a transient indexing failure?
-            log.warn("Exception while indexing binary property: " + e.toString());
-            log.debug("Dump: ", e);
+            log.warn("Exception while indexing binary property", t);
         }
     }
 



Mime
View raw message