Join identical catch branches

See gh-2052
This commit is contained in:
igor-suhorukov
2018-12-14 02:03:33 +03:00
committed by Stephane Nicoll
parent 93e7a0a59d
commit a218bf40cd
5 changed files with 16 additions and 49 deletions

View File

@@ -56,15 +56,10 @@ public class MockUOWManager implements UOWManager {
action.run();
this.status = (this.rollbackOnly ? UOW_STATUS_ROLLEDBACK : UOW_STATUS_COMMITTED);
}
catch (Error err) {
this.status = UOW_STATUS_ROLLEDBACK;
throw err;
}
catch (RuntimeException ex) {
catch (Error | RuntimeException ex) {
this.status = UOW_STATUS_ROLLEDBACK;
throw ex;
}
catch (Exception ex) {
} catch (Exception ex) {
this.status = UOW_STATUS_ROLLEDBACK;
throw new UOWActionException(ex);
}