You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2007/05/17 05:40:18 UTC

svn commit: r538800 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/core/Config.java

Author: ehatcher
Date: Wed May 16 20:40:17 2007
New Revision: 538800

URL: http://svn.apache.org/viewvc?view=rev&rev=538800
Log:
SOLR-241: Undefined system properties used in configuration files now cause a clear message to be logged rather than an obscure exception thrown.

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/core/Config.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?view=diff&rev=538800&r1=538799&r2=538800
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Wed May 16 20:40:17 2007
@@ -306,7 +306,11 @@
     content.  Using the contentType: "text/xml; charset=utf-8" will force
     utf-8 encoding.  If you do not specify a contentType, it will use the 
     platform default.  (Koji Sekiguchi via ryan)
- 
+
+15. SOLR-241: Undefined system properties used in configuration files now
+    cause a clear message to be logged rather than an obscure exception thrown.
+    (Koji Sekiguchi via ehatcher) 
+
 Other Changes
  1. Updated to Lucene 2.1
 

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/Config.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/Config.java?view=diff&rev=538800&r1=538799&r2=538800
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/Config.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/Config.java Wed May 16 20:40:17 2007
@@ -64,7 +64,13 @@
     javax.xml.parsers.DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
     doc = builder.parse(is);
 
-    DOMUtil.substituteSystemProperties(doc);
+    try{
+    	DOMUtil.substituteSystemProperties(doc);
+    }
+    catch( SolrException e ){
+    	SolrException.log(log,"Error in "+name,e);
+    	throw e;
+    }
   }
 
   public Document getDocument() {