jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r616104 - in /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons: AbstractSession.java AbstractWorkspace.java
Date Mon, 28 Jan 2008 23:30:45 GMT
Author: jukka
Date: Mon Jan 28 15:30:40 2008
New Revision: 616104

URL: http://svn.apache.org/viewvc?rev=616104&view=rev
Log:
JCR-1350: Add a serializing content handler
    - Need to unwrap SAXExceptions

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractWorkspace.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java?rev=616104&r1=616103&r2=616104&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
Mon Jan 28 15:30:40 2008
@@ -126,7 +126,14 @@
                 getImportContentHandler(parentAbsPath, uuidBehavior);
             new ParsingContentHandler(handler).parse(in);
         } catch (SAXException e) {
-            throw new RepositoryException("XML import failed", e);
+            Throwable exception = e.getException();
+            if (exception instanceof RepositoryException) {
+                throw (RepositoryException) exception;
+            } else if (exception instanceof IOException) {
+                throw (IOException) exception;
+            } else {
+                throw new RepositoryException("XML import failed", e);
+            }
         }
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractWorkspace.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractWorkspace.java?rev=616104&r1=616103&r2=616104&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractWorkspace.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractWorkspace.java
Mon Jan 28 15:30:40 2008
@@ -50,7 +50,14 @@
                 getImportContentHandler(parentAbsPath, uuidBehavior);
             new ParsingContentHandler(handler).parse(in);
         } catch (SAXException e) {
-            throw new RepositoryException("XML import failed", e);
+            Throwable exception = e.getException();
+            if (exception instanceof RepositoryException) {
+                throw (RepositoryException) exception;
+            } else if (exception instanceof IOException) {
+                throw (IOException) exception;
+            } else {
+                throw new RepositoryException("XML import failed", e);
+            }
         }
     }
 



Mime
View raw message