Open
Description
So application code doesn’t need to do this:
try {
doTheThing()
} catch (e: ConstraintViolationException) {
throw ConflictException()
} catch (e: RetryTransactionException) {
when (Throwables.getRootCause(e)) {
is ConstraintViolationException -> throw ConflictException()
else -> throw e
}
} catch (e: javax.persistence.OptimisticLockException) {
throw ConflictException()
} catch (e: org.hibernate.OptimisticLockException) {
throw ConflictException()
}