jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r647133 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ConfigurationParser.java
Date Fri, 11 Apr 2008 12:07:56 GMT
Author: mreutegg
Date: Fri Apr 11 05:07:50 2008
New Revision: 647133

URL: http://svn.apache.org/viewvc?rev=647133&view=rev
Log:
JCR-1531: [PATCH] Add Column and line numbers to repository.xml parse exception messages

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ConfigurationParser.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ConfigurationParser.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ConfigurationParser.java?rev=647133&r1=647132&r2=647133&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ConfigurationParser.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/ConfigurationParser.java
Fri Apr 11 05:07:50 2008
@@ -23,6 +23,7 @@
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
 import org.apache.jackrabbit.util.Text;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -216,9 +217,12 @@
         } catch (ParserConfigurationException e) {
             throw new ConfigurationException(
                     "Unable to create configuration XML parser", e);
+        } catch (SAXParseException e) {
+            throw new ConfigurationException(
+                    "Configuration file syntax error. (Line: " + e.getLineNumber() + " Column:
" + e.getColumnNumber() + ")", e);
         } catch (SAXException e) {
             throw new ConfigurationException(
-                    "Configuration file syntax error.", e);
+                    "Configuration file syntax error. ", e);
         } catch (IOException e) {
             throw new ConfigurationException(
                     "Configuration file could not be read.", e);



Mime
View raw message