The above methods have error handling like this:
try {
...
commit( transaction );
}
catch ( RuntimeException exception ) {
rollback( transaction, exception );
throw exception;
}
My question is: shouldn’t the transaction be rolled back in case of all Throwable
s? (Like Error
s and maybe in case of “sneaky throws”?)
Thanks.