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 16:42:02 UTC
svn commit: r1230599 -
/lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java
Author: erick
Date: Thu Jan 12 15:42:01 2012
New Revision: 1230599
URL: http://svn.apache.org/viewvc?rev=1230599&view=rev
Log:
Part of SOLR-3022. It seems like a good idea to retrofit NOT defaulting to true for "alreadyLogged"
Modified:
lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java
Modified: lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java?rev=1230599&r1=1230598&r2=1230599&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java (original)
+++ lucene/dev/branches/branch_3x/solr/solrj/src/java/org/apache/solr/common/SolrException.java Thu Jan 12 15:42:01 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);
}
/**