SOLR-991 -- Better error message when parsing solrconfig.xml fails due to malformed XML. Error message notes the name of the file being parsed.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@738916 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2009-01-29 16:39:01 +00:00
parent fd7e53ad74
commit caf1fc2725
3 changed files with 10 additions and 1 deletions

View File

@ -223,6 +223,9 @@ Bug Fixes
26. SOLR-883: Implicit properties are not set for Cores created through CoreAdmin (Noble Paul via shalin)
27. SOLR-991: Better error message when parsing solrconfig.xml fails due to malformed XML. Error message notes the name
of the file being parsed. (Michael Henson via shalin)
Other Changes
----------------------

View File

@ -30,7 +30,7 @@
NOTE: this schema includes many optional features and should not
be used for benchmarking.
-->
-- >
<schema name="example" version="1.1">
<!-- attribute "name" is the name of this schema and is only used for display purposes.

View File

@ -104,6 +104,12 @@ public class Config {
doc = builder.parse(lis);
DOMUtil.substituteProperties(doc, loader.getCoreProperties());
} catch (ParserConfigurationException e) {
SolrException.log(log, "Exception during parsing file: " + name, e);
throw e;
} catch (SAXException e) {
SolrException.log(log, "Exception during parsing file: " + name, e);
throw e;
} catch( SolrException e ){
SolrException.log(log,"Error in "+name,e);
throw e;