Class RestExceptionHandlerAdvice
- java.lang.Object
-
- org.flowable.ui.common.rest.exception.RestExceptionHandlerAdvice
-
@ControllerAdvice public class RestExceptionHandlerAdvice extends Object
From http://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc- Author:
- Joram Barrez
-
-
Constructor Summary
Constructors Constructor Description RestExceptionHandlerAdvice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ErrorInfocreateInfoFromException(BaseModelerRestException exception, String defaultMessageKey)protected StringgetSafeMessageKey(String fragment)ErrorInfohandleBadRequest(BadRequestException e)ErrorInfohandleConflict(ConflictingRequestException e)ErrorInfohandleInternalServerError(InternalServerErrorException e)ErrorInfohandleLockedUser(org.springframework.security.authentication.LockedException e)voidhandleNonJsonResourceNotFound(NonJsonResourceNotFoundException e)ErrorInfohandleNoPermission(NotPermittedException e)ErrorInfohandleNotFound(NotFoundException e)ErrorInfohandleUnauthorized(UnauthorizedException e)
-
-
-
Method Detail
-
handleNotFound
@ResponseStatus(NOT_FOUND) @ExceptionHandler(NotFoundException.class) @ResponseBody public ErrorInfo handleNotFound(NotFoundException e)
-
handleNonJsonResourceNotFound
@ResponseStatus(NOT_FOUND) @ExceptionHandler(NonJsonResourceNotFoundException.class) public void handleNonJsonResourceNotFound(NonJsonResourceNotFoundException e)
-
handleBadRequest
@ResponseStatus(BAD_REQUEST) @ExceptionHandler(BadRequestException.class) @ResponseBody public ErrorInfo handleBadRequest(BadRequestException e)
-
handleInternalServerError
@ResponseStatus(INTERNAL_SERVER_ERROR) @ExceptionHandler(InternalServerErrorException.class) @ResponseBody public ErrorInfo handleInternalServerError(InternalServerErrorException e)
-
handleNoPermission
@ResponseStatus(FORBIDDEN) @ExceptionHandler(NotPermittedException.class) @ResponseBody public ErrorInfo handleNoPermission(NotPermittedException e)
-
handleLockedUser
@ResponseStatus(UNAUTHORIZED) @ExceptionHandler(org.springframework.security.authentication.LockedException.class) @ResponseBody public ErrorInfo handleLockedUser(org.springframework.security.authentication.LockedException e)
-
handleUnauthorized
@ResponseStatus(UNAUTHORIZED) @ExceptionHandler(UnauthorizedException.class) @ResponseBody public ErrorInfo handleUnauthorized(UnauthorizedException e)
-
handleConflict
@ResponseStatus(CONFLICT) @ExceptionHandler(ConflictingRequestException.class) @ResponseBody public ErrorInfo handleConflict(ConflictingRequestException e)
-
createInfoFromException
protected ErrorInfo createInfoFromException(BaseModelerRestException exception, String defaultMessageKey)
-
-