fix exceptions thrown from JD lifecycle method
SS does not do exception translation Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
afc92451d9
commit
0da311e022
|
@ -62,12 +62,12 @@ public class LifecycleMethod extends AbstractAnnotatedMethod {
|
||||||
declaration.append("\t}\n");
|
declaration.append("\t}\n");
|
||||||
if ( operationName.equals("insert") ) {
|
if ( operationName.equals("insert") ) {
|
||||||
convertException(declaration,
|
convertException(declaration,
|
||||||
"jakarta.persistence.EntityExistsException",
|
"org.hibernate.exception.ConstraintViolationException",
|
||||||
"jakarta.data.exceptions.EntityExistsException");
|
"jakarta.data.exceptions.EntityExistsException");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
convertException(declaration,
|
convertException(declaration,
|
||||||
"jakarta.persistence.OptimisticLockException",
|
"org.hibernate.StaleStateException",
|
||||||
"jakarta.data.exceptions.OptimisticLockingFailureException");
|
"jakarta.data.exceptions.OptimisticLockingFailureException");
|
||||||
}
|
}
|
||||||
convertException(declaration,
|
convertException(declaration,
|
||||||
|
|
Loading…
Reference in New Issue