From 73e8335f9eec3720385be92e65323607c59feda8 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 25 Mar 2020 21:29:30 +0100 Subject: [PATCH] Improved error reporting --- app/src/main/java/eu/faircode/email/Log.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index ecdf009f88..829de9f74a 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -169,7 +169,7 @@ public class Log { public static int w(String prefix, Throwable ex) { if (BuildConfig.BETA_RELEASE) try { - Bugsnag.notify(ex.getClass().getName(), prefix, ex.getStackTrace(), new Callback() { + Bugsnag.notify(ex.getClass().getName(), prefix + ": " + ex.getMessage(), ex.getStackTrace(), new Callback() { @Override public void beforeNotify(@NonNull Report report) { report.getError().setSeverity(Severity.INFO); @@ -184,7 +184,7 @@ public class Log { public static int e(String prefix, Throwable ex) { if (BuildConfig.BETA_RELEASE) try { - Bugsnag.notify(ex.getClass().getName(), prefix, ex.getStackTrace(), new Callback() { + Bugsnag.notify(ex.getClass().getName(), prefix + ": " + ex.getMessage(), ex.getStackTrace(), new Callback() { @Override public void beforeNotify(@NonNull Report report) { report.getError().setSeverity(Severity.WARNING); @@ -282,7 +282,8 @@ public class Log { return false; Throwable ex = report.getError().getException(); - return shouldNotify(ex); + boolean should = shouldNotify(ex); + return should; } private boolean shouldNotify(Throwable ex) {