MCPcopy Create free account
hub / github.com/castello/spring_basic / catcher

Method catcher

ch2/ExceptionController.java:20–28  ·  view source on GitHub ↗
(Exception ex, Model m)

Source from the content-addressed store, hash-verified

18 }
19
20 @ExceptionHandler(Exception.class)
21 @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) // 200 -> 500
22 public String catcher(Exception ex, Model m) {
23 System.out.println("catcher() in ExceptionController");
24 System.out.println("m="+m);
25// m.addAttribute("ex", ex);
26
27 return "error";
28 }
29
30 @RequestMapping("/ex")
31 public String main(Model m) throws Exception {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected