mirror of https://github.com/apache/lucene.git
Better exception error message for what may be a common startup problem
git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@380206 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3bd4668a16
commit
53ad895510
|
@ -28,13 +28,15 @@ public class SolrConfig {
|
|||
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 @@ public class SolrConfig {
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue