mirror of https://github.com/apache/lucene.git
SOLR-6161: Walk the entire cause chain looking for an Error
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1603708 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db8ea25a09
commit
2fbc511c38
|
@ -434,12 +434,16 @@ public class SolrDispatchFilter extends BaseSolrFilter {
|
|||
}
|
||||
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) {
|
||||
// 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) ex.getCause();
|
||||
}
|
||||
throw (Error) t;
|
||||
}
|
||||
t = t.getCause();
|
||||
}
|
||||
return;
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue