servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r481532 - /incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
Date Sat, 02 Dec 2006 09:38:10 GMT
Author: gnodet
Date: Sat Dec  2 01:38:09 2006
New Revision: 481532

URL: http://svn.apache.org/viewvc?view=rev&rev=481532
Log:
When a parsing error occurs, ensure the root cause is set

Modified:
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java?view=diff&rev=481532&r1=481531&r2=481532
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
(original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
Sat Dec  2 01:38:09 2006
@@ -140,12 +140,15 @@
                 streamReader.next();
             }
         } catch (XMLStreamException e) {
+            SAXParseException spe;
             if (e.getLocation() != null) {
-                throw new SAXParseException(e.getMessage(), null, null, e.getLocation().getLineNumber(),
e.getLocation()
+                spe = new SAXParseException(e.getMessage(), null, null, e.getLocation().getLineNumber(),
e.getLocation()
                         .getColumnNumber(), e);
             } else {
-                throw new SAXParseException(e.getMessage(), null, null, -1, -1, e);
+                spe = new SAXParseException(e.getMessage(), null, null, -1, -1, e);
             }
+            spe.initCause(e);
+            throw spe;
         }
     }
 



Mime
View raw message