Skip to content

Commit ebada8e

Browse files
authored
Abort transaction in all cases (#881)
See JAVA-4575 for more details.
1 parent a407f87 commit ebada8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-sync/src/main/com/mongodb/client/internal/ClientSessionImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public <T> T withTransaction(final TransactionBody<T> transactionBody, final Tra
209209
try {
210210
startTransaction(options);
211211
retVal = transactionBody.execute();
212-
} catch (RuntimeException e) {
212+
} catch (Throwable e) {
213213
if (transactionState == TransactionState.IN) {
214214
abortTransaction();
215215
}

0 commit comments

Comments
 (0)