jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1213249 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
Date Mon, 12 Dec 2011 14:05:08 GMT
Author: alexparvulescu
Date: Mon Dec 12 14:05:08 2011
New Revision: 1213249

URL: http://svn.apache.org/viewvc?rev=1213249&view=rev
Log:
JCR-3178 Improve error messages for index aggregates

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java?rev=1213249&r1=1213248&r2=1213249&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
Mon Dec 12 14:05:08 2011
@@ -56,6 +56,7 @@ import org.apache.jackrabbit.core.query.
 import org.apache.jackrabbit.core.session.SessionContext;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.ItemStateManager;
+import org.apache.jackrabbit.core.state.NoSuchItemStateException;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.spi.Name;
@@ -1525,10 +1526,15 @@ public class SearchIndex extends Abstrac
                         break;
                     }
                 }
+            } catch (NoSuchItemStateException e) {
+                // do not fail if aggregate cannot be created
+                log.info(
+                        "Exception while building indexing aggregate for {}. Node is not
available {}.",
+                        state.getNodeId(), e.getMessage());
             } catch (Exception e) {
                 // do not fail if aggregate cannot be created
-                log.warn("Exception while building indexing aggregate for"
-                        + " node with id: " + state.getNodeId(), e);
+                log.warn("Exception while building indexing aggregate for "
+                        + state.getNodeId(), e);
             }
         }
     }
@@ -1694,6 +1700,10 @@ public class SearchIndex extends Abstrac
             } finally {
                 reader.release();
             }
+        } catch (NoSuchItemStateException e) {
+            log.info(
+                    "Exception while retrieving aggregate roots. Node is not available {}.",
+                    e.getMessage());
         } catch (Exception e) {
             log.warn("Exception while retrieving aggregate roots", e);
         }



Mime
View raw message