The parent:
@ExceptionHandler(NoUserException.class)
protected ModelAndView handleException(NoUserException e) {
Map<String, Object> model = new HashMap<String, Object>();
model.put(ModelKeys.HOST_KEY, "message");
return new ModelAndView("noAccess",model);
}
The child:
@ExceptionHandler(NoUserException.class)
protected void handleException(NoUserException e, HttpServletRequest request, HttpServletResponse response) throws IOException {
logger.error("Invalid user.");
respond(CLIENT_USER_ERROR,response);
}
Yes, I do need them to have different parameters and outputs.