Skip to content

Commit 73a1c08

Browse files
authored
Merge pull request #140 from ebean-orm/feature/139-followup
#139 follow up - use Throwable in catch blocks
2 parents 009dfe0 + 3ea57f0 commit 73a1c08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ebean-migration/src/main/java/io/ebean/migration/runner/MigrationEngine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public List<MigrationResource> run(Connection connection) {
5959
} catch (MigrationException e) {
6060
rollback(connection);
6161
throw e;
62-
} catch (Exception e) {
62+
} catch (Throwable e) {
6363
log.log(ERROR, "Perform rollback due to DB migration error", e);
6464
rollback(connection);
6565
throw new MigrationException("Error running DB migrations", e);
@@ -80,7 +80,7 @@ private MigrationTable initialiseMigrationTable(Connection connection) {
8080
final MigrationTable table = new MigrationTable(migrationConfig, connection, checkStateOnly, platform);
8181
table.createIfNeededAndLock();
8282
return table;
83-
} catch (Exception e) {
83+
} catch (Throwable e) {
8484
rollback(connection);
8585
throw new MigrationException("Error initialising db migrations table", e);
8686
}

0 commit comments

Comments
 (0)