Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 25988 invoked from network); 11 Apr 2008 12:08:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Apr 2008 12:08:21 -0000 Received: (qmail 36068 invoked by uid 500); 11 Apr 2008 12:08:21 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 35992 invoked by uid 500); 11 Apr 2008 12:08:21 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 35983 invoked by uid 99); 11 Apr 2008 12:08:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 05:08:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 12:07:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BE57C1A9832; Fri, 11 Apr 2008 05:07:57 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@jackrabbit.apache.org From: mreutegg@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080411120757.BE57C1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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);