diff --git a/ebean-migration/src/main/java/io/ebean/migration/runner/MigrationEngine.java b/ebean-migration/src/main/java/io/ebean/migration/runner/MigrationEngine.java index 17f5c95..bf080e5 100644 --- a/ebean-migration/src/main/java/io/ebean/migration/runner/MigrationEngine.java +++ b/ebean-migration/src/main/java/io/ebean/migration/runner/MigrationEngine.java @@ -59,7 +59,7 @@ public List run(Connection connection) { } catch (MigrationException e) { rollback(connection); throw e; - } catch (Exception e) { + } catch (Throwable e) { log.log(ERROR, "Perform rollback due to DB migration error", e); rollback(connection); throw new MigrationException("Error running DB migrations", e); @@ -80,7 +80,7 @@ private MigrationTable initialiseMigrationTable(Connection connection) { final MigrationTable table = new MigrationTable(migrationConfig, connection, checkStateOnly, platform); table.createIfNeededAndLock(); return table; - } catch (Exception e) { + } catch (Throwable e) { rollback(connection); throw new MigrationException("Error initialising db migrations table", e); }