Replies: 2 comments 2 replies
-
Hey Noor. Interesting. I worry a bit about trying to do things with the database after the program has suffered a critical error but I think your example shows that catching throwable would (i.e. including error) is warranted. Can you turn this into an issue that I can code against? Thanks! |
Beta Was this translation helpful? Give feedback.
2 replies
-
Submitted as 59309e5 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there, long time no talk :) I hope you're doing fine, and happy new year to you and your family!
Recently, I've been debugging an app for a few hours and didn't understand why the transaction isn't being rolled back when an error occurs. The thrown error was app-specific and extended
Throwable
, notException
. After careful inspection, I saw this inTransactionManager.java
: https://github.com/j256/ormlite-core/blob/main/src/main/java/com/j256/ormlite/misc/TransactionManager.java#L255It seems the
callInTransaction
will catch onlyException
s, notThrowable
s.I reckon it'd be better if the code catches the latter, what do you think @j256 ?
Beta Was this translation helpful? Give feedback.
All reactions