Defensive catching of any Throwable subclasses instead of just Error
Issue: SPR-14329
This commit is contained in:
@@ -972,7 +972,7 @@ public class DispatcherServlet extends FrameworkServlet {
|
||||
catch (Exception ex) {
|
||||
dispatchException = ex;
|
||||
}
|
||||
catch (Error err) {
|
||||
catch (Throwable err) {
|
||||
// As of 4.3, we're processing Errors thrown from handler methods as well,
|
||||
// making them available for @ExceptionHandler methods and other scenarios.
|
||||
dispatchException = new NestedServletException("Handler dispatch failed", err);
|
||||
@@ -982,7 +982,7 @@ public class DispatcherServlet extends FrameworkServlet {
|
||||
catch (Exception ex) {
|
||||
triggerAfterCompletion(processedRequest, response, mappedHandler, ex);
|
||||
}
|
||||
catch (Error err) {
|
||||
catch (Throwable err) {
|
||||
triggerAfterCompletion(processedRequest, response, mappedHandler,
|
||||
new NestedServletException("Handler processing failed", err));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user