You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2010/10/24 15:01:45 UTC

svn commit: r1026783 - /lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrCore.java

Author: markrmiller
Date: Sun Oct 24 13:01:45 2010
New Revision: 1026783

URL: http://svn.apache.org/viewvc?rev=1026783&view=rev
Log:
don't say logged = true if you havn't logged the solrexception

Modified:
    lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrCore.java

Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrCore.java?rev=1026783&r1=1026782&r2=1026783&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrCore.java Sun Oct 24 13:01:45 2010
@@ -418,8 +418,9 @@ public final class SolrCore implements S
     if (msg == null) msg = "SolrCore Object";
     try {
         clazz = getResourceLoader().findClass(className);
-        if (cast != null && !cast.isAssignableFrom(clazz))
-          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,"Error Instantiating "+msg+", "+className+ " is not a " +cast.getName());
+        if (cast != null && !cast.isAssignableFrom(clazz)) {
+          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.
       // So invariably always it will cause a  NoSuchMethodException. So iterate though the list of available constructors
         Constructor[] cons =  clazz.getConstructors();
@@ -591,7 +592,7 @@ public final class SolrCore implements S
       resourceLoader.inform( this );  // last call before the latch is released.
       instance = this;   // set singleton for backwards compatibility
     } catch (IOException e) {
-      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, null, e, false);
     } finally {
       // allow firstSearcher events to fire
       latch.countDown();