Skip to content
Permalink
Browse files

Map ValidationException to Spring DataIntegrityViolationException.

  • Loading branch information...
archiecobbs committed Oct 29, 2019
1 parent 8c61bc6 commit 58cb387fb2335b231c666b17660bb3c8086edbea
@@ -4,6 +4,7 @@ Version Next
- Added method NavigableSetPager.getPageNumber()
- Added convenience method NavigableSetPager.reverseViewOrdering()
- Added method MutableView.setReadTrackingPaused()
- Map ValidationException to Spring DataIntegrityViolationException
- Fixed a few minor Java expression parsing bugs

Version 4.1.5 Released May 21, 2019
@@ -5,6 +5,7 @@

package io.permazen.spring;

import io.permazen.ValidationException;
import io.permazen.core.DeletedObjectException;
import io.permazen.core.InvalidSchemaException;
import io.permazen.core.ReferencedObjectException;
@@ -54,6 +55,8 @@ public DataAccessException translateExceptionIfPossible(RuntimeException e0) {
return new ConcurrencyFailureException(message, e0);
if (e0 instanceof TransactionTimeoutException)
return new QueryTimeoutException(message, e0);
if (e0 instanceof ValidationException)
return new DataIntegrityViolationException(message, e0);
return null;
}
}

0 comments on commit 58cb387

Please sign in to comment.
You can’t perform that action at this time.