Subject | Exceptions on FBBackupManager |
---|---|
Author | glbradasch |
Post date | 2009-01-16T11:52:48Z |
Hello,
I'm trying to implement a routine that has to restore a database over
an existing one. The code is like this:
FBBackupManager backupManager = new FBBackupManager();
---- CODE ----
// Configures the manager with some params from my app
backupManager.setHost(params.getHost());
backupManager.setUser(params.getUsername());
backupManager.setPassword(params.getPassword());
backupManager.setDatabase(params.getDatabase());
backupManager.setBackupPath((new File(backupLocation,
ORIGINALDB_FILE)).getPath());
backupManager.setRestoreReplace(true);
backupManager.setVerbose(true);
backupManager.setLogger(System.out);
try {
backupManager.restoreDatabase();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
---- END CODE ----
My problem is that if something goes wrong - for instance, if the
database I'm trying to replace is in use - the restoreDatabase()
method doesn't throw any exception - I can only see that it went wrong
on the console.
Is this a bug or the expected behaviour?
Thanks,
Guilherme Bradasch
I'm trying to implement a routine that has to restore a database over
an existing one. The code is like this:
FBBackupManager backupManager = new FBBackupManager();
---- CODE ----
// Configures the manager with some params from my app
backupManager.setHost(params.getHost());
backupManager.setUser(params.getUsername());
backupManager.setPassword(params.getPassword());
backupManager.setDatabase(params.getDatabase());
backupManager.setBackupPath((new File(backupLocation,
ORIGINALDB_FILE)).getPath());
backupManager.setRestoreReplace(true);
backupManager.setVerbose(true);
backupManager.setLogger(System.out);
try {
backupManager.restoreDatabase();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
---- END CODE ----
My problem is that if something goes wrong - for instance, if the
database I'm trying to replace is in use - the restoreDatabase()
method doesn't throw any exception - I can only see that it went wrong
on the console.
Is this a bug or the expected behaviour?
Thanks,
Guilherme Bradasch