try {
return transaction.run(transactionSnapshot.getClientData());
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new InvocationException("Exception in the transactional code", e);
} finally {
snapshotStack.poll();
// === Removed from the stack ===
}
}