You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2014/06/19 06:33:22 UTC
svn commit: r1603709 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/core/
solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Author: shalin
Date: Thu Jun 19 04:33:21 2014
New Revision: 1603709
URL: http://svn.apache.org/r1603709
Log:
SOLR-6161: Walk the entire cause chain looking for an Error
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/core/ (props changed)
lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1603709&r1=1603708&r2=1603709&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Thu Jun 19 04:33:21 2014
@@ -432,12 +432,16 @@ public class SolrDispatchFilter extends
}
catch (Throwable ex) {
sendError( core, solrReq, request, (HttpServletResponse)response, ex );
- if (ex instanceof Error) {
- throw (Error) ex;
- }
- if (ex.getCause() != null && ex.getCause() instanceof Error) {
- log.error("An Error was wrapped in another exception - please report complete stacktrace on SOLR-6161", ex);
- throw (Error) ex.getCause();
+ // walk the the entire cause chain to search for an Error
+ Throwable t = ex;
+ while (t != null) {
+ if (t instanceof Error) {
+ if (t != ex) {
+ log.error("An Error was wrapped in another exception - please report complete stacktrace on SOLR-6161", ex);
+ }
+ throw (Error) t;
+ }
+ t = t.getCause();
}
return;
} finally {