Search code examples
transactionsjdbi

How do I know if transaction code succeeded?


The examples of @Transaction I see in the official docs returns void and doesn't have a throws Exception declaration. Is there a runtime exception that happens if the transaction fails?


Solution

  • RollbackException is a RuntimeException. No throws necessary for that.