Catch database init error on move

This commit is contained in:
Risto Lahtela 2020-08-30 22:34:03 +03:00
parent 8939148f95
commit 5ebc722d43

View File

@ -245,12 +245,12 @@ public class DatabaseCommands {
}
private void performMove(CMDSender sender, DBType fromDB, DBType toDB) {
Database fromDatabase = dbSystem.getActiveDatabaseByType(fromDB);
Database toDatabase = dbSystem.getActiveDatabaseByType(toDB);
fromDatabase.init();
toDatabase.init();
try {
Database fromDatabase = dbSystem.getActiveDatabaseByType(fromDB);
Database toDatabase = dbSystem.getActiveDatabaseByType(toDB);
fromDatabase.init();
toDatabase.init();
sender.send("Writing to " + toDB.getName() + "..");
fromDatabase.executeTransaction(new BackupCopyTransaction(fromDatabase, toDatabase)).get();