From d603e00d35b77f0f8c347c6bc1782e20b1ac9c9a Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 24 Sep 2019 15:34:39 +0200 Subject: [PATCH] Improved OAuth error message --- app/src/main/java/eu/faircode/email/MailService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/MailService.java b/app/src/main/java/eu/faircode/email/MailService.java index 9477f84a47..5c9e0f2e95 100644 --- a/app/src/main/java/eu/faircode/email/MailService.java +++ b/app/src/main/java/eu/faircode/email/MailService.java @@ -206,9 +206,9 @@ public class MailService implements AutoCloseable { } throw new IllegalArgumentException("Account not found"); - } catch (Throwable ex1) { + } catch (Exception ex1) { Log.e(ex1); - throw ex; + throw new AuthenticationFailedException(ex.getMessage(), ex1); } else throw ex;