test_class.declarator: exceptionHandler
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private HerdErrorInformationExceptionHandler exceptionHandler;
test_class.type: HerdErrorInformationExceptionHandler
test_class.var_name: exceptionHandler
test_class.declarator: MESSAGE = "This is a test and is not an actual error. Please ignore."
test_class.modifier: private static final
test_class.original_string: private static final String MESSAGE = "This is a test and is not an actual error. Please ignore.";
test_class.type: String
test_class.var_name: MESSAGE
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/HerdErrorInformationExceptionHandlerTest.java
test_class.identifier: HerdErrorInformationExceptionHandlerTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testActivitiExceptionInternalServerError() throws Exception
      {
          validateErrorInformation(exceptionHandler.handleActivitiException(new ActivitiException(MESSAGE), new MockHttpServletResponse()),
              HttpStatus.INTERNAL_SERVER_ERROR, false);
      }
test_case.class_method_signature: HerdErrorInformationExceptionHandlerTest.testActivitiExceptionInternalServerError()
test_case.full_signature: @Test public void testActivitiExceptionInternalServerError()
test_case.identifier: testActivitiExceptionInternalServerError
test_case.invocations: validateErrorInformation handleActivitiException
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testActivitiExceptionInternalServerError()
focal_class.declarator: ORACLE_DATA_TOO_LARGE_ERROR_CODE = 12899
focal_class.modifier: public static final
focal_class.original_string: public static final int ORACLE_DATA_TOO_LARGE_ERROR_CODE = 12899;
focal_class.type: int
focal_class.var_name: ORACLE_DATA_TOO_LARGE_ERROR_CODE
focal_class.declarator: ORACLE_LONG_DATA_IN_LONG_COLUMN_ERROR_CODE = 1461
focal_class.modifier: public static final
focal_class.original_string: public static final int ORACLE_LONG_DATA_IN_LONG_COLUMN_ERROR_CODE = 1461;
focal_class.type: int
focal_class.var_name: ORACLE_LONG_DATA_IN_LONG_COLUMN_ERROR_CODE
focal_class.declarator: ORACLE_SQL_STATE_CODE_ERROR = "72000"
focal_class.modifier: public static final
focal_class.original_string: public static final String ORACLE_SQL_STATE_CODE_ERROR = "72000";
focal_class.type: String
focal_class.var_name: ORACLE_SQL_STATE_CODE_ERROR
focal_class.declarator: POSTGRES_SQL_STATE_CODE_FOREIGN_KEY_VIOLATION = "23503"
focal_class.modifier: public static final
focal_class.original_string: public static final String POSTGRES_SQL_STATE_CODE_FOREIGN_KEY_VIOLATION = "23503";
focal_class.type: String
focal_class.var_name: POSTGRES_SQL_STATE_CODE_FOREIGN_KEY_VIOLATION
focal_class.declarator: POSTGRES_SQL_STATE_CODE_UNIQUE_INDEX_OR_PRIMARY_KEY_VIOLATION = "23505"
focal_class.modifier: public static final
focal_class.original_string: public static final String POSTGRES_SQL_STATE_CODE_UNIQUE_INDEX_OR_PRIMARY_KEY_VIOLATION = "23505";
focal_class.type: String
focal_class.var_name: POSTGRES_SQL_STATE_CODE_UNIQUE_INDEX_OR_PRIMARY_KEY_VIOLATION
focal_class.declarator: POSTGRES_SQL_STATE_CODE_TRUNCATION_ERROR = "22001"
focal_class.modifier: public static final
focal_class.original_string: public static final String POSTGRES_SQL_STATE_CODE_TRUNCATION_ERROR = "22001";
focal_class.type: String
focal_class.var_name: POSTGRES_SQL_STATE_CODE_TRUNCATION_ERROR
focal_class.declarator: LOGGER = LoggerFactory.getLogger(HerdErrorInformationExceptionHandler.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(HerdErrorInformationExceptionHandler.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: loggingEnabled = false
focal_class.modifier: private
focal_class.original_string: private boolean loggingEnabled = false;
focal_class.type: boolean
focal_class.var_name: loggingEnabled
focal_class.declarator: resolver
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ExceptionHandlerMethodResolver resolver;
focal_class.type: ExceptionHandlerMethodResolver
focal_class.var_name: resolver
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/HerdErrorInformationExceptionHandler.java
focal_class.identifier: HerdErrorInformationExceptionHandler
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handleAccessDeniedException(Exception exception)
focal_class.full_signature: @ExceptionHandler(value = AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody public ErrorInformation handleAccessDeniedException(Exception exception)
focal_class.identifier: handleAccessDeniedException
focal_class.modifiers: @ExceptionHandler(value = AccessDeniedException.class) @ResponseStatus(HttpStatus.FORBIDDEN) @ResponseBody public
focal_class.parameters: (Exception exception)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handleAccessDeniedException(Exception exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handleActivitiException(Exception exception, HttpServletResponse response)
focal_class.full_signature: @ExceptionHandler(value = ActivitiException.class) @ResponseBody public ErrorInformation handleActivitiException(Exception exception, HttpServletResponse response)
focal_class.identifier: handleActivitiException
focal_class.modifiers: @ExceptionHandler(value = ActivitiException.class) @ResponseBody public
focal_class.parameters: (Exception exception, HttpServletResponse response)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handleActivitiException(Exception exception, HttpServletResponse response)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handleBadRequestException(Exception exception)
focal_class.full_signature: @ExceptionHandler(value = {IllegalArgumentException.class, HttpMessageNotReadableException.class, MissingServletRequestParameterException.class, TypeMismatchException.class, UnsupportedEncodingException.class}) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody public ErrorInformation handleBadRequestException(Exception exception)
focal_class.identifier: handleBadRequestException
focal_class.modifiers: @ExceptionHandler(value = {IllegalArgumentException.class, HttpMessageNotReadableException.class, MissingServletRequestParameterException.class, TypeMismatchException.class, UnsupportedEncodingException.class}) @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody public
focal_class.parameters: (Exception exception)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handleBadRequestException(Exception exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handleConflictException(Exception exception)
focal_class.full_signature: @ExceptionHandler(value = {AlreadyExistsException.class, ObjectAlreadyExistsException.class, OptimisticLockException.class}) @ResponseStatus(HttpStatus.CONFLICT) @ResponseBody public ErrorInformation handleConflictException(Exception exception)
focal_class.identifier: handleConflictException
focal_class.modifiers: @ExceptionHandler(value = {AlreadyExistsException.class, ObjectAlreadyExistsException.class, OptimisticLockException.class}) @ResponseStatus(HttpStatus.CONFLICT) @ResponseBody public
focal_class.parameters: (Exception exception)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handleConflictException(Exception exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handleInternalServerErrorException(Exception exception)
focal_class.full_signature: @ExceptionHandler(value = Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) @ResponseBody public ErrorInformation handleInternalServerErrorException(Exception exception)
focal_class.identifier: handleInternalServerErrorException
focal_class.modifiers: @ExceptionHandler(value = Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) @ResponseBody public
focal_class.parameters: (Exception exception)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handleInternalServerErrorException(Exception exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handleNotFoundException(RuntimeException exception)
focal_class.full_signature: @ExceptionHandler(value = {org.hibernate.ObjectNotFoundException.class, ObjectNotFoundException.class}) @ResponseStatus(HttpStatus.NOT_FOUND) @ResponseBody public ErrorInformation handleNotFoundException(RuntimeException exception)
focal_class.identifier: handleNotFoundException
focal_class.modifiers: @ExceptionHandler(value = {org.hibernate.ObjectNotFoundException.class, ObjectNotFoundException.class}) @ResponseStatus(HttpStatus.NOT_FOUND) @ResponseBody public
focal_class.parameters: (RuntimeException exception)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handleNotFoundException(RuntimeException exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handleOperationNotAllowedException(RuntimeException exception)
focal_class.full_signature: @ExceptionHandler(value = MethodNotAllowedException.class) @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) @ResponseBody public ErrorInformation handleOperationNotAllowedException(RuntimeException exception)
focal_class.identifier: handleOperationNotAllowedException
focal_class.modifiers: @ExceptionHandler(value = MethodNotAllowedException.class) @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) @ResponseBody public
focal_class.parameters: (RuntimeException exception)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handleOperationNotAllowedException(RuntimeException exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.handlePersistenceException(Exception exception, HttpServletResponse response)
focal_class.full_signature: @ExceptionHandler(value = {JpaSystemException.class, PersistenceException.class}) @ResponseBody public ErrorInformation handlePersistenceException(Exception exception, HttpServletResponse response)
focal_class.identifier: handlePersistenceException
focal_class.modifiers: @ExceptionHandler(value = {JpaSystemException.class, PersistenceException.class}) @ResponseBody public
focal_class.parameters: (Exception exception, HttpServletResponse response)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation handlePersistenceException(Exception exception, HttpServletResponse response)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.isLoggingEnabled()
focal_class.full_signature: public boolean isLoggingEnabled()
focal_class.identifier: isLoggingEnabled
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isLoggingEnabled()
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.setLoggingEnabled(boolean loggingEnabled)
focal_class.full_signature: public void setLoggingEnabled(boolean loggingEnabled)
focal_class.identifier: setLoggingEnabled
focal_class.modifiers: public
focal_class.parameters: (boolean loggingEnabled)
focal_class.return: void
focal_class.signature: void setLoggingEnabled(boolean loggingEnabled)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.isReportableError(Throwable exception)
focal_class.full_signature: @SuppressWarnings({"unchecked", "rawtypes"}) public boolean isReportableError(Throwable exception)
focal_class.identifier: isReportableError
focal_class.modifiers: @SuppressWarnings({"unchecked", "rawtypes"}) public
focal_class.parameters: (Throwable exception)
focal_class.return: boolean
focal_class.signature: boolean isReportableError(Throwable exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.getErrorInformation(HttpStatus httpStatus, Throwable exception)
focal_class.full_signature: private ErrorInformation getErrorInformation(HttpStatus httpStatus, Throwable exception)
focal_class.identifier: getErrorInformation
focal_class.modifiers: private
focal_class.parameters: (HttpStatus httpStatus, Throwable exception)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation getErrorInformation(HttpStatus httpStatus, Throwable exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.getErrorInformationAndSetStatus(HttpStatus httpStatus, Throwable exception, HttpServletResponse response)
focal_class.full_signature: private ErrorInformation getErrorInformationAndSetStatus(HttpStatus httpStatus, Throwable exception, HttpServletResponse response)
focal_class.identifier: getErrorInformationAndSetStatus
focal_class.modifiers: private
focal_class.parameters: (HttpStatus httpStatus, Throwable exception, HttpServletResponse response)
focal_class.return: ErrorInformation
focal_class.signature: ErrorInformation getErrorInformationAndSetStatus(HttpStatus httpStatus, Throwable exception, HttpServletResponse response)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.getRootCause(Exception throwable)
focal_class.full_signature: private Throwable getRootCause(Exception throwable)
focal_class.identifier: getRootCause
focal_class.modifiers: private
focal_class.parameters: (Exception throwable)
focal_class.return: Throwable
focal_class.signature: Throwable getRootCause(Exception throwable)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.isCausedByConstraintViolationException(Exception exception)
focal_class.full_signature: private boolean isCausedByConstraintViolationException(Exception exception)
focal_class.identifier: isCausedByConstraintViolationException
focal_class.modifiers: private
focal_class.parameters: (Exception exception)
focal_class.return: boolean
focal_class.signature: boolean isCausedByConstraintViolationException(Exception exception)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.isDataTruncationException(Throwable throwable)
focal_class.full_signature: private boolean isDataTruncationException(Throwable throwable)
focal_class.identifier: isDataTruncationException
focal_class.modifiers: private
focal_class.parameters: (Throwable throwable)
focal_class.return: boolean
focal_class.signature: boolean isDataTruncationException(Throwable throwable)
focal_class.class_method_signature: HerdErrorInformationExceptionHandler.logError(String message, Exception exception)
focal_class.full_signature: protected void logError(String message, Exception exception)
focal_class.identifier: logError
focal_class.modifiers: protected
focal_class.parameters: (String message, Exception exception)
focal_class.return: void
focal_class.signature: void logError(String message, Exception exception)
focal_method.body: @ExceptionHandler(value = ActivitiException.class)
      @ResponseBody
      public ErrorInformation handleActivitiException(Exception exception, HttpServletResponse response)
      {
          if ((ExceptionUtils.indexOfThrowable(exception, ActivitiClassLoadingException.class) != -1) ||
              (ExceptionUtils.indexOfType(exception, ELException.class) != -1))
          {
              // These exceptions are caused by invalid workflow configurations (i.e. user error) so they are considered a bad request.
              return getErrorInformationAndSetStatus(HttpStatus.BAD_REQUEST, exception, response);
          }
          else
          {
              // For all other exceptions, something is wrong that we weren't expecting so we'll return this as an internal server error and log the error.
              logError("An Activiti error occurred.", exception);
              return getErrorInformationAndSetStatus(HttpStatus.INTERNAL_SERVER_ERROR, exception, response);
          }
      }
focal_method.class_method_signature: HerdErrorInformationExceptionHandler.handleActivitiException(Exception exception, HttpServletResponse response)
focal_method.full_signature: @ExceptionHandler(value = ActivitiException.class) @ResponseBody public ErrorInformation handleActivitiException(Exception exception, HttpServletResponse response)
focal_method.identifier: handleActivitiException
focal_method.invocations: indexOfThrowable indexOfType getErrorInformationAndSetStatus logError getErrorInformationAndSetStatus
focal_method.modifiers: @ExceptionHandler(value = ActivitiException.class) @ResponseBody public
focal_method.parameters: (Exception exception, HttpServletResponse response)
focal_method.return: ErrorInformation
focal_method.signature: ErrorInformation handleActivitiException(Exception exception, HttpServletResponse response)