-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle select Hibernate data exception classes in LoggingExceptionMap…
…per (#79) * Handle select Hibernate data exception classes in LoggingExceptionMapper * Handle Hibernate OptimisticEntityLockException and ConstraintViolationException classes * Refactor internal logic to use a map from class name to a category which is then used to select the appropriate response status code. The only annoying thing is that we don't yet have Java's new exhaustive compiler check on the switch, so the default arm cannot be covered with tests. * Refactor LoggingExceptionMapperTest to use the actual Spring and Hibernate classes, which allowed us to change the dataAccessExceptionResponse method to be private * Add the Spring and Hibernate dependencies with test scope Closes #48
- Loading branch information
1 parent
e0e49c7
commit c89ddd4
Showing
3 changed files
with
108 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters