jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r745060 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype: NodeTypeManagerImpl.java xml/NodeTypeWriter.java
Date Tue, 17 Feb 2009 13:40:09 GMT
Author: thomasm
Date: Tue Feb 17 13:40:08 2009
New Revision: 745060

URL: http://svn.apache.org/viewvc?rev=745060&view=rev
Log:
JCR-1982 Exception root cause is swallowed on nodetype I/O error

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?rev=745060&r1=745059&r2=745060&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Tue Feb 17 13:40:08 2009
@@ -252,7 +252,9 @@
 
                     nodeTypeDefs.addAll(reader.getNodeTypeDefs());
                 } catch (ParseException e) {
-                    throw new IOException(e.getMessage());
+                    IOException e2 = new IOException(e.getMessage());
+                    e2.initCause(e);
+                    throw e2;
                 }
             } else {
                 throw new UnsupportedRepositoryOperationException(
@@ -692,7 +694,7 @@
 
             return new NodeTypeIteratorAdapter(result);
         } catch (InvalidNodeTypeDefException e) {
-            throw new InvalidNodeTypeDefinitionException(e.getMessage());
+            throw new InvalidNodeTypeDefinitionException(e.getMessage(), e);
         }
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java?rev=745060&r1=745059&r2=745060&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
Tue Feb 17 13:40:08 2009
@@ -65,7 +65,9 @@
             }
             writer.write(xml);
         } catch (ParserConfigurationException e) {
-            throw new IOException(e.getMessage());
+            IOException e2 = new IOException(e.getMessage());
+            e2.initCause(e);
+            throw e2;
         } catch (NamespaceException e) {
             throw new RepositoryException(
                     "Invalid namespace reference in a node type definition", e);



Mime
View raw message