You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2012/01/12 15:56:14 UTC
svn commit: r1230573 -
/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrException.java
Author: erick
Date: Thu Jan 12 14:56:13 2012
New Revision: 1230573
URL: http://svn.apache.org/viewvc?rev=1230573&view=rev
Log:
Fix for SOLR-3022 (Plugin Loader doesn't log exceptions). See SOLR-2191 and SOLR-3032 as well.
Modified:
lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrException.java
Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrException.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrException.java?rev=1230573&r1=1230572&r2=1230573&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrException.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrException.java Thu Jan 12 14:56:13 2012
@@ -58,14 +58,11 @@ public class SolrException extends Runti
public boolean logged=false;
public SolrException(ErrorCode code, String msg) {
- super(msg);
- this.code=code.code;
+ this(code, msg, null, false);
}
public SolrException(ErrorCode code, String msg, boolean alreadyLogged) {
- super(msg);
- this.code=code.code;
- this.logged=alreadyLogged;
+ this(code, msg, null, alreadyLogged);
}
public SolrException(ErrorCode code, String msg, Throwable th, boolean alreadyLogged) {
@@ -75,13 +72,11 @@ public class SolrException extends Runti
}
public SolrException(ErrorCode code, String msg, Throwable th) {
- this(code,msg,th,true);
+ this(code, msg, th, (th instanceof SolrException) ? ((SolrException)th).logged : false);
}
public SolrException(ErrorCode code, Throwable th) {
- super(th);
- this.code=code.code;
- logged=true;
+ this(code, null, th, (th instanceof SolrException) ? ((SolrException)th).logged : false);
}
/**