Class BaseExceptionHandlerAdvice
- java.lang.Object
-
- org.flowable.common.rest.exception.BaseExceptionHandlerAdvice
-
@ControllerAdvice public class BaseExceptionHandlerAdvice extends Object
Base class for ExceptionHandlerAdvice controllers From http://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc- Author:
- Tijs Rademakers
-
-
Field Summary
Fields Modifier and Type Field Description protected booleansendFullErrorExceptionFlag indicating whether to send the full error exception message for unknown exceptions.
-
Constructor Summary
Constructors Constructor Description BaseExceptionHandlerAdvice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorInfohandleBadMessageConversion(org.springframework.http.converter.HttpMessageConversionException e)ErrorInfohandleConflict(FlowableConflictException e)ErrorInfohandleForbidden(FlowableForbiddenException e)ErrorInfohandleIllegalArgument(FlowableIllegalArgumentException e)ErrorInfohandleIllegalState(FlowableIllegalStateException e)ErrorInfohandleNotFound(FlowableObjectNotFoundException e)ErrorInfohandleNotSupported(FlowableContentNotSupportedException e)ErrorInfohandleOtherException(Exception e)ErrorInfohandleTaskAlreadyClaimed(FlowableTaskAlreadyClaimedException e)booleanisSendFullErrorException()voidsetSendFullErrorException(boolean sendFullErrorException)
-
-
-
Field Detail
-
sendFullErrorException
protected boolean sendFullErrorException
Flag indicating whether to send the full error exception message for unknown exceptions. If set totrue, then theThrowable.getMessage()will be set on theErrorInfo.setException(String), otherwise a unique error identifier will be set and a message containing that identifier will be logged.
-
-
Method Detail
-
handleNotSupported
@ResponseStatus(UNSUPPORTED_MEDIA_TYPE) @ExceptionHandler(FlowableContentNotSupportedException.class) @ResponseBody public ErrorInfo handleNotSupported(FlowableContentNotSupportedException e)
-
handleConflict
@ResponseStatus(CONFLICT) @ExceptionHandler(FlowableConflictException.class) @ResponseBody public ErrorInfo handleConflict(FlowableConflictException e)
-
handleNotFound
@ResponseStatus(NOT_FOUND) @ExceptionHandler(org.flowable.common.engine.api.FlowableObjectNotFoundException.class) @ResponseBody public ErrorInfo handleNotFound(FlowableObjectNotFoundException e)
-
handleForbidden
@ResponseStatus(FORBIDDEN) @ExceptionHandler(org.flowable.common.engine.api.FlowableForbiddenException.class) @ResponseBody public ErrorInfo handleForbidden(FlowableForbiddenException e)
-
handleIllegalArgument
@ResponseStatus(BAD_REQUEST) @ExceptionHandler(org.flowable.common.engine.api.FlowableIllegalArgumentException.class) @ResponseBody public ErrorInfo handleIllegalArgument(FlowableIllegalArgumentException e)
-
handleIllegalState
@ResponseStatus(BAD_REQUEST) @ExceptionHandler(org.flowable.common.engine.api.FlowableIllegalStateException.class) @ResponseBody public ErrorInfo handleIllegalState(FlowableIllegalStateException e)
-
handleBadMessageConversion
@ResponseStatus(BAD_REQUEST) @ExceptionHandler(org.springframework.http.converter.HttpMessageConversionException.class) @ResponseBody public ErrorInfo handleBadMessageConversion(org.springframework.http.converter.HttpMessageConversionException e)
-
handleTaskAlreadyClaimed
@ResponseStatus(CONFLICT) @ExceptionHandler(org.flowable.common.engine.api.FlowableTaskAlreadyClaimedException.class) @ResponseBody public ErrorInfo handleTaskAlreadyClaimed(FlowableTaskAlreadyClaimedException e)
-
handleOtherException
@ResponseStatus(INTERNAL_SERVER_ERROR) @ExceptionHandler(java.lang.Exception.class) @ResponseBody public ErrorInfo handleOtherException(Exception e)
-
isSendFullErrorException
public boolean isSendFullErrorException()
-
setSendFullErrorException
public void setSendFullErrorException(boolean sendFullErrorException)
-
-