[jboss-svn-commits] JBoss Common SVN: r2639 - jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 12 19:16:51 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-10-12 19:16:50 -0400 (Fri, 12 Oct 2007)
New Revision: 2639

Modified:
   jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java
Log:
Improve the schema binding failure msg

Modified: jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java
===================================================================
--- jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java	2007-10-12 02:30:40 UTC (rev 2638)
+++ jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java	2007-10-12 23:16:50 UTC (rev 2639)
@@ -31,6 +31,7 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.xb.binding.JBossXBRuntimeException;
 import org.jboss.xb.builder.JBossXBBuilder;
 import org.w3c.dom.ls.LSInput;
 import org.xml.sax.InputSource;
@@ -307,8 +308,18 @@
    
             Boolean processAnnotationsBoolean = schemaParseAnnotationsByUri.get(nsURI);
             boolean processAnnotations = (processAnnotationsBoolean == null) ? true : processAnnotationsBoolean.booleanValue();
-            schema = XsdBinder.bind(is.getByteStream(), null, baseURI, processAnnotations);
-            foundByNS = true;
+            try
+            {
+               schema = XsdBinder.bind(is.getByteStream(), null, baseURI, processAnnotations);
+               foundByNS = true;
+            }
+            catch(RuntimeException e)
+            {
+               String msg = "Failed to parse schema for nsURI="+nsURI
+                  +", baseURI="+baseURI
+                  +", schemaLocation="+schemaLocation;
+               throw new JBossXBRuntimeException(msg, e);
+            }
          }
       }
 




More information about the jboss-svn-commits mailing list