|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2017 the original author or authors. |
|
|
|
* Copyright 2002-2018 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -176,12 +176,13 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso |
|
|
|
* @param handler the executed handler, or {@code null} if none chosen at the time |
|
|
|
* @param handler the executed handler, or {@code null} if none chosen at the time |
|
|
|
* of the exception (for example, if multipart resolution failed) |
|
|
|
* of the exception (for example, if multipart resolution failed) |
|
|
|
* @param ex the exception that got thrown during handler execution |
|
|
|
* @param ex the exception that got thrown during handler execution |
|
|
|
* @return a corresponding ModelAndView to forward to, or {@code null} for default processing |
|
|
|
* @return a corresponding {@code ModelAndView} to forward to, |
|
|
|
|
|
|
|
* or {@code null} for default processing in the resolution chain |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
|
protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response, |
|
|
|
protected ModelAndView doResolveException( |
|
|
|
@Nullable Object handler, Exception ex) { |
|
|
|
HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex) { |
|
|
|
|
|
|
|
|
|
|
|
// Expose ModelAndView for chosen error view.
|
|
|
|
// Expose ModelAndView for chosen error view.
|
|
|
|
String viewName = determineViewName(ex, request); |
|
|
|
String viewName = determineViewName(ex, request); |
|
|
|
|