diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado')
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/TransactionManager.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/TransactionManager.java b/src/main/java/com/amazon/carbonado/spi/TransactionManager.java index 676a15d..f16f548 100644 --- a/src/main/java/com/amazon/carbonado/spi/TransactionManager.java +++ b/src/main/java/com/amazon/carbonado/spi/TransactionManager.java @@ -402,15 +402,12 @@ public abstract class TransactionManager<Txn> { if (!txnMgr.commitTxn(mTxn)) {
mTxn = null;
}
- } catch (PersistException e) {
- mTxn = null;
- throw e;
} catch (Throwable e) {
mTxn = null;
if (txnMgr.mExTransformer != null) {
throw txnMgr.mExTransformer.toPersistException(e);
}
- throw new PersistException(e);
+ throw ExceptionTransformer.getInstance().toPersistException(e);
}
} else {
// Indicate fake nested transaction committed.
@@ -439,13 +436,11 @@ public abstract class TransactionManager<Txn> { if (mParent == null || mParent.mTxn != mTxn) {
try {
txnMgr.abortTxn(mTxn);
- } catch (PersistException e) {
- throw e;
} catch (Throwable e) {
if (txnMgr.mExTransformer != null) {
throw txnMgr.mExTransformer.toPersistException(e);
}
- throw new PersistException(e);
+ throw ExceptionTransformer.getInstance().toPersistException(e);
}
}
} finally {
|