Improve debugging when migration fails
This commit is contained in:
parent
2effee0f5c
commit
3001a4a542
@ -114,7 +114,18 @@ public class MigratorRoot implements Migrator, Active
|
||||
if (entityVersionCurrent != entityVersionExpected) throw new IllegalArgumentException(String.format("Entiy version: %d Expected: %d", entityVersionCurrent, entityVersionExpected));
|
||||
|
||||
// ... do the migration.
|
||||
this.migrateInner(entity);
|
||||
|
||||
try
|
||||
{
|
||||
this.migrateInner(entity);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
System.out.println("Problem with migrating entity: ");
|
||||
System.out.println(entity.toString());
|
||||
throw t;
|
||||
}
|
||||
|
||||
this.migrateVersion(entity);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user