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:34:16 UTC
svn commit: r1603710 - in /lucene/dev/branches/lucene_solr_4_9: ./ solr/
solr/core/ solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Author: shalin
Date: Thu Jun 19 04:34:16 2014
New Revision: 1603710
URL: http://svn.apache.org/r1603710
Log:
SOLR-6161: Walk the entire cause chain looking for an Error
Modified:
lucene/dev/branches/lucene_solr_4_9/ (props changed)
lucene/dev/branches/lucene_solr_4_9/solr/ (props changed)
lucene/dev/branches/lucene_solr_4_9/solr/core/ (props changed)
lucene/dev/branches/lucene_solr_4_9/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
Modified: lucene/dev/branches/lucene_solr_4_9/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_9/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1603710&r1=1603709&r2=1603710&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_9/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/branches/lucene_solr_4_9/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Thu Jun 19 04:34:16 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 {