don't say logged = true if you havn't logged the solrexception

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1026783 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2010-10-24 13:01:45 +00:00
parent f89acfbc20
commit 026dc77556
1 changed files with 4 additions and 3 deletions

View File

@ -418,8 +418,9 @@ public final class SolrCore implements SolrInfoMBean {
if (msg == null) msg = "SolrCore Object"; if (msg == null) msg = "SolrCore Object";
try { try {
clazz = getResourceLoader().findClass(className); clazz = getResourceLoader().findClass(className);
if (cast != null && !cast.isAssignableFrom(clazz)) if (cast != null && !cast.isAssignableFrom(clazz)) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,"Error Instantiating "+msg+", "+className+ " is not a " +cast.getName()); throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,"Error Instantiating "+msg+", "+className+ " is not a " +cast.getName(), false);
}
//most of the classes do not have constructors which takes SolrCore argument. It is recommended to obtain SolrCore by implementing SolrCoreAware. //most of the classes do not have constructors which takes SolrCore argument. It is recommended to obtain SolrCore by implementing SolrCoreAware.
// So invariably always it will cause a NoSuchMethodException. So iterate though the list of available constructors // So invariably always it will cause a NoSuchMethodException. So iterate though the list of available constructors
Constructor[] cons = clazz.getConstructors(); Constructor[] cons = clazz.getConstructors();
@ -591,7 +592,7 @@ public final class SolrCore implements SolrInfoMBean {
resourceLoader.inform( this ); // last call before the latch is released. resourceLoader.inform( this ); // last call before the latch is released.
instance = this; // set singleton for backwards compatibility instance = this; // set singleton for backwards compatibility
} catch (IOException e) { } catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e); throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, null, e, false);
} finally { } finally {
// allow firstSearcher events to fire // allow firstSearcher events to fire
latch.countDown(); latch.countDown();