Improve error logging: #153

This commit is contained in:
cpfeiffer 2015-10-26 22:31:57 +01:00
parent 695f83e19e
commit 39c7a853c8
1 changed files with 2 additions and 3 deletions

View File

@ -196,8 +196,7 @@ public class DebugActivity extends Activity {
File destFile = helper.exportDB(dbHandler.getHelper(), dir);
GB.toast(this, "Exported to: " + destFile.getAbsolutePath(), Toast.LENGTH_LONG, GB.INFO);
} catch (Exception ex) {
LOG.error("Unable to export db", ex);
Toast.makeText(this, "Error exporting DB: " + ex.getMessage(), Toast.LENGTH_LONG).show();
GB.toast(this, "Error exporting DB: " + ex.getMessage(), Toast.LENGTH_LONG, GB.ERROR, ex);
} finally {
if (dbHandler != null) {
dbHandler.release();
@ -217,7 +216,7 @@ public class DebugActivity extends Activity {
helper.validateDB(sqLiteOpenHelper);
GB.toast(this, "Import successful.", Toast.LENGTH_LONG, GB.INFO);
} catch (Exception ex) {
GB.toast(this, "Error importing DB: " + ex.getMessage(), Toast.LENGTH_LONG, GB.ERROR);
GB.toast(this, "Error importing DB: " + ex.getMessage(), Toast.LENGTH_LONG, GB.ERROR, ex);
} finally {
if (dbHandler != null) {
dbHandler.release();