Class ModelingRestExceptionHandler
- java.lang.Object
-
- org.activiti.cloud.services.modeling.rest.controller.ModelingRestExceptionHandler
-
@ControllerAdvice @Order(-2147483648) public class ModelingRestExceptionHandler extends Object
Handler for REST exceptions
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_ACCESS_EXCEPTION_MESSAGEstatic StringDATA_INTEGRITY_VIOLATION_EXCEPTION_MESSAGEstatic StringERRORS
-
Constructor Summary
Constructors Constructor Description ModelingRestExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.boot.web.servlet.error.ErrorAttributeserrorAttributes()voidhandleBadRequestException(Exception ex, javax.servlet.http.HttpServletResponse response)voidhandleDataAccessException(Exception ex, javax.servlet.http.HttpServletResponse response)voidhandleDataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException ex, javax.servlet.http.HttpServletResponse response)voidhandleModelNameConflictException(ModelNameConflictException ex, javax.servlet.http.HttpServletResponse response)voidhandleModelScopeIntegrityException(ModelScopeIntegrityException ex, javax.servlet.http.HttpServletResponse response)
-
-
-
Field Detail
-
ERRORS
public static final String ERRORS
- See Also:
- Constant Field Values
-
DATA_INTEGRITY_VIOLATION_EXCEPTION_MESSAGE
public static final String DATA_INTEGRITY_VIOLATION_EXCEPTION_MESSAGE
- See Also:
- Constant Field Values
-
DATA_ACCESS_EXCEPTION_MESSAGE
public static final String DATA_ACCESS_EXCEPTION_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
errorAttributes
@Bean public org.springframework.boot.web.servlet.error.ErrorAttributes errorAttributes()
-
handleBadRequestException
@ExceptionHandler({org.activiti.cloud.modeling.core.error.UnknownModelTypeException.class,org.activiti.cloud.modeling.core.error.SyntacticModelValidationException.class,org.activiti.cloud.modeling.core.error.SemanticModelValidationException.class,org.activiti.cloud.modeling.core.error.ImportProjectException.class,org.activiti.cloud.modeling.core.error.ImportModelException.class}) public void handleBadRequestException(Exception ex, javax.servlet.http.HttpServletResponse response) throws IOException- Throws:
IOException
-
handleDataIntegrityViolationException
@ExceptionHandler(org.springframework.dao.DataIntegrityViolationException.class) public void handleDataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException ex, javax.servlet.http.HttpServletResponse response) throws IOException- Throws:
IOException
-
handleModelNameConflictException
@ExceptionHandler(org.activiti.cloud.modeling.core.error.ModelNameConflictException.class) public void handleModelNameConflictException(ModelNameConflictException ex, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
handleModelScopeIntegrityException
@ExceptionHandler(org.activiti.cloud.modeling.core.error.ModelScopeIntegrityException.class) public void handleModelScopeIntegrityException(ModelScopeIntegrityException ex, javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
handleDataAccessException
@ExceptionHandler({org.springframework.dao.DataAccessException.class,javax.persistence.PersistenceException.class,java.sql.SQLException.class}) public void handleDataAccessException(Exception ex, javax.servlet.http.HttpServletResponse response) throws IOException- Throws:
IOException
-
-