Class ModelingRestExceptionHandler
- java.lang.Object
-
- org.activiti.cloud.services.modeling.rest.controller.ModelingRestExceptionHandler
-
@ControllerAdvice @Order(-2147483648) public class ModelingRestExceptionHandler extends java.lang.ObjectHandler for REST exceptions
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDATA_ACCESS_EXCEPTION_MESSAGEstatic java.lang.StringDATA_INTEGRITY_VIOLATION_EXCEPTION_MESSAGEstatic java.lang.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(java.lang.Exception ex, javax.servlet.http.HttpServletResponse response)voidhandleDataAccessException(java.lang.Exception ex, javax.servlet.http.HttpServletResponse response)voidhandleDataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException ex, javax.servlet.http.HttpServletResponse response)
-
-
-
Field Detail
-
ERRORS
public static final java.lang.String ERRORS
- See Also:
- Constant Field Values
-
DATA_INTEGRITY_VIOLATION_EXCEPTION_MESSAGE
public static final java.lang.String DATA_INTEGRITY_VIOLATION_EXCEPTION_MESSAGE
- See Also:
- Constant Field Values
-
DATA_ACCESS_EXCEPTION_MESSAGE
public static final java.lang.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(java.lang.Exception ex, javax.servlet.http.HttpServletResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
handleDataIntegrityViolationException
@ExceptionHandler(org.springframework.dao.DataIntegrityViolationException.class) public void handleDataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException ex, javax.servlet.http.HttpServletResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
handleDataAccessException
@ExceptionHandler({org.springframework.dao.DataAccessException.class,javax.persistence.PersistenceException.class,java.sql.SQLException.class}) public void handleDataAccessException(java.lang.Exception ex, javax.servlet.http.HttpServletResponse response) throws java.io.IOException- Throws:
java.io.IOException
-
-