Polishing
This commit is contained in:
@@ -491,10 +491,10 @@ public abstract class ExtendedEntityManagerCreator {
|
||||
}
|
||||
|
||||
private RuntimeException convertException(RuntimeException ex) {
|
||||
DataAccessException daex = (this.exceptionTranslator != null) ?
|
||||
DataAccessException dae = (this.exceptionTranslator != null) ?
|
||||
this.exceptionTranslator.translateExceptionIfPossible(ex) :
|
||||
EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex);
|
||||
return (daex != null ? daex : ex);
|
||||
return (dae != null ? dae : ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -533,9 +533,9 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager
|
||||
}
|
||||
catch (RollbackException ex) {
|
||||
if (ex.getCause() instanceof RuntimeException) {
|
||||
DataAccessException dex = getJpaDialect().translateExceptionIfPossible((RuntimeException) ex.getCause());
|
||||
if (dex != null) {
|
||||
throw dex;
|
||||
DataAccessException dae = getJpaDialect().translateExceptionIfPossible((RuntimeException) ex.getCause());
|
||||
if (dae != null) {
|
||||
throw dae;
|
||||
}
|
||||
}
|
||||
throw new TransactionSystemException("Could not commit JPA transaction", ex);
|
||||
|
||||
Reference in New Issue
Block a user