mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 06:45:21 +00:00
#2549 - Fix DefaultPersister to expose non RuntimeExceptions on insert/update/delete. Not hide NoClassDefFoundError etc
This commit is contained in:
1 parent
daf0ba67a4
commit
d0fcd4a13a
1 file changed
+4
-7
@@ -81,8 +81,7 @@ public final class DefaultPersister implements Persister {
|
||||
int rc = request.executeOrQueue();
|
||||
request.commitTransIfRequired();
|
||||
return rc;
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
} catch (Throwable e) {
|
||||
request.rollbackTransIfRequired();
|
||||
throw e;
|
||||
} finally {
|
||||
@@ -383,8 +382,7 @@ public final class DefaultPersister implements Persister {
|
||||
req.resetDepth();
|
||||
req.commitTransIfRequired();
|
||||
req.flushBatchOnCascade();
|
||||
|
||||
} catch (RuntimeException ex) {
|
||||
} catch (Throwable ex) {
|
||||
req.rollbackTransIfRequired();
|
||||
throw ex;
|
||||
} finally {
|
||||
@@ -420,8 +418,7 @@ public final class DefaultPersister implements Persister {
|
||||
req.resetDepth();
|
||||
req.commitTransIfRequired();
|
||||
req.flushBatchOnCascade();
|
||||
|
||||
} catch (RuntimeException ex) {
|
||||
} catch (Throwable ex) {
|
||||
req.rollbackTransIfRequired();
|
||||
throw ex;
|
||||
} finally {
|
||||
@@ -559,7 +556,7 @@ public final class DefaultPersister implements Persister {
|
||||
req.flushBatchOnCascade();
|
||||
return rows;
|
||||
|
||||
} catch (RuntimeException ex) {
|
||||
} catch (Throwable ex) {
|
||||
req.rollbackTransIfRequired();
|
||||
throw ex;
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user