Author: yonik
Date: Thu Feb 23 11:47:00 2006
New Revision: 380206
URL: http://svn.apache.org/viewcvs?rev=380206&view=rev
Log:
Better exception error message for what may be a common startup problem
Modified:
incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
Modified: incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
URL:
http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java?rev=380206&r1=380205&r2=380206&view=diff
==============================================================================
--- incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
(original)
+++ incubator/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java Thu Feb
23 11:47:00 2006
@@ -28,13 +28,15 @@
static {
Exception e=null;
String file="solrconfig.xml";
- InputStream is;
+ InputStream is=null;
try {
is = Config.openResource(file);
} catch (Exception ee) {
e=ee;
file = "solarconfig.xml"; // backward compat
- is = Config.openResource(file);
+ try {
+ is = Config.openResource(file);
+ } catch (Exception eee) {}
}
if (is!=null) {
try {
@@ -45,7 +47,7 @@
}
Config.log.info("Loaded Config solrconfig.xml");
} else {
- throw new RuntimeException(e);
+ throw new RuntimeException("Can't find Solr config file
./conf/solrconfig.xml",e);
}
}
}