Skip to content

Commit

Permalink
Issue #5939 Use unwrapped exception as exception type for error handling
Browse files Browse the repository at this point in the history
Signed-off-by: olivier lamy <[email protected]>
  • Loading branch information
olamy committed Feb 3, 2021
1 parent 67fcecc commit 8d54122
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ public String getErrorPage(HttpServletRequest request)
if (errorPage != null)
matchedThrowable = exClass;

th = (th instanceof ServletException) ? ((ServletException)th).getRootCause() : null;
if (th instanceof ServletException){
th = ((ServletException)th).getRootCause();
if (th != null) {
request.setAttribute(Dispatcher.ERROR_EXCEPTION_TYPE, th.getClass());
}
}

}

Integer errorStatusCode = null;
Expand Down

0 comments on commit 8d54122

Please sign in to comment.