@ControllerAdvice(value="org.finra.herd.ui.controller") public class HerdUiControllerAdvice extends Object
| Constructor and Description |
|---|
HerdUiControllerAdvice() |
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.web.servlet.ModelAndView |
getDisplayErrorMessageModelAndView(String message)
Gets a "displayErrorMessage" model and view.
|
static org.springframework.web.servlet.ModelAndView |
getDisplayErrorModelAndView()
Gets a "displayError" model and view with no model present.
|
void |
handleAccessDeniedException(org.springframework.security.access.AccessDeniedException accessDeniedException,
javax.servlet.http.HttpServletResponse response) |
org.springframework.web.servlet.ModelAndView |
handleException(Exception ex)
Handle all other controller exceptions by returning to a general error page with a general message.
|
org.springframework.web.servlet.ModelAndView |
handleUserException(UserException ex)
Handle all user exceptions by returning to a general error page while displaying the exception message to the user.
|
@ExceptionHandler(value=UserException.class) public org.springframework.web.servlet.ModelAndView handleUserException(UserException ex)
ex - the exception being handled.@ExceptionHandler(value=org.springframework.security.access.AccessDeniedException.class)
public void handleAccessDeniedException(org.springframework.security.access.AccessDeniedException accessDeniedException,
javax.servlet.http.HttpServletResponse response)
throws IOException
IOException@ExceptionHandler(value=java.lang.Exception.class) public org.springframework.web.servlet.ModelAndView handleException(Exception ex)
ex - the exception being handled.public static org.springframework.web.servlet.ModelAndView getDisplayErrorModelAndView()
public static org.springframework.web.servlet.ModelAndView getDisplayErrorMessageModelAndView(String message)
message - An optional error message to include in the model. If null, it won't be included in the model. The message will be automatically HTML
escaped.Copyright © 2019. All rights reserved.