Skip to content

Commit

Permalink
pinpoint-apm#535 Shows detail error message when web controller meets…
Browse files Browse the repository at this point in the history
… any exception.

1. improve log message when occur exception.
  • Loading branch information
koo-taejin committed Oct 18, 2016
1 parent 4cf078d commit 5103f91
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public class ControllerExceptionHandler {

@ExceptionHandler(value = Exception.class)
public ModelAndView defaultErrorHandler(HttpServletRequest request, Exception exception) throws Exception {
logger.warn("Error:{}", exception.getMessage(), exception);
Map<String, Object> requestResource = createRequestResource(request);
logger.warn("Failed to execute controller methods. message:{}, request:{}.", getExceptionMessage(exception), requestResource, exception);

ModelAndView mav = new ModelAndView();
mav.addObject("exception", createExceptionResource(request, exception));
mav.setViewName(DEFAULT_ERROR_VIEW);
Expand Down

0 comments on commit 5103f91

Please # to comment.