Class ExceptionHandlers
java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
org.craftercms.profile.management.web.controllers.ExceptionHandlers
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.MessageSourceAware
@ControllerAdvice
public class ExceptionHandlers
extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
ControllerAdvice for controllers that includes exception
handling for all known exceptions.- Author:
- avasquez
-
Field Summary
Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request) org.springframework.http.ResponseEntity<Object> handleInvalidRequestParameterException(InvalidRequestParameterException e, org.springframework.web.context.request.WebRequest request) org.springframework.http.ResponseEntity<Object> handleProfileException(ProfileException e, org.springframework.web.context.request.WebRequest request) org.springframework.http.ResponseEntity<Object> handleProfileRestServiceException(ProfileRestServiceException e, org.springframework.web.context.request.WebRequest request) org.springframework.http.ResponseEntity<Object> handleResourceNotFoundException(ResourceNotFoundException e, org.springframework.web.context.request.WebRequest request) org.springframework.http.ResponseEntity<Object> handleUnauthorizedException(org.craftercms.commons.security.exception.ActionDeniedException e, org.springframework.web.context.request.WebRequest request) Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
createProblemDetail, createResponseEntity, getMessageSource, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleErrorResponseException, handleException, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodArgumentNotValid, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource
-
Constructor Details
-
ExceptionHandlers
public ExceptionHandlers()
-
-
Method Details
-
handleResourceNotFoundException
@ExceptionHandler(ResourceNotFoundException.class) public org.springframework.http.ResponseEntity<Object> handleResourceNotFoundException(ResourceNotFoundException e, org.springframework.web.context.request.WebRequest request) -
handleInvalidRequestParameterException
@ExceptionHandler(InvalidRequestParameterException.class) public org.springframework.http.ResponseEntity<Object> handleInvalidRequestParameterException(InvalidRequestParameterException e, org.springframework.web.context.request.WebRequest request) -
handleProfileRestServiceException
@ExceptionHandler(ProfileRestServiceException.class) public org.springframework.http.ResponseEntity<Object> handleProfileRestServiceException(ProfileRestServiceException e, org.springframework.web.context.request.WebRequest request) -
handleProfileException
@ExceptionHandler(ProfileException.class) public org.springframework.http.ResponseEntity<Object> handleProfileException(ProfileException e, org.springframework.web.context.request.WebRequest request) -
handleUnauthorizedException
@ExceptionHandler(org.craftercms.commons.security.exception.ActionDeniedException.class) public org.springframework.http.ResponseEntity<Object> handleUnauthorizedException(org.craftercms.commons.security.exception.ActionDeniedException e, org.springframework.web.context.request.WebRequest request) -
handleExceptionInternal
protected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request) - Overrides:
handleExceptionInternalin classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
handleExceptionInternal
-
handleExceptionInternal
-