Class ModelingRestExceptionHandler


  • @ControllerAdvice
    @Order(-2147483648)
    public class ModelingRestExceptionHandler
    extends java.lang.Object
    Handler for REST exceptions
    • Field Detail

      • 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
    • Constructor Detail

      • ModelingRestExceptionHandler

        public ModelingRestExceptionHandler()
    • 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