diff --git a/mvc/src/main/java/webmvc/org/springframework/web/servlet/mvc/DispatcherServlet.java b/mvc/src/main/java/webmvc/org/springframework/web/servlet/mvc/DispatcherServlet.java index 12e9cbf4cb..aba4eb5658 100644 --- a/mvc/src/main/java/webmvc/org/springframework/web/servlet/mvc/DispatcherServlet.java +++ b/mvc/src/main/java/webmvc/org/springframework/web/servlet/mvc/DispatcherServlet.java @@ -68,8 +68,8 @@ protected void service(final HttpServletRequest request, final HttpServletRespon final View view = getView(modelAndView); final Map model = modelAndView.getModel(); view.render(model, request, response); - } catch (final HandlerMappingException e) { - throw new HandlerMappingException(e.getMessage()); + } catch (final HandlerMappingException | ViewResolverException e) { + throw e; } catch (final Throwable e) { log.error("Exception : {}", e.getMessage(), e); throw new ServletException(e.getMessage());