From a44c73ad3ca4f6c9233c3710bfd1d6f27c01f659 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 20 May 2024 18:36:06 +0200 Subject: [PATCH] Added no AI available error --- app/src/main/java/eu/faircode/email/AI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AI.java b/app/src/main/java/eu/faircode/email/AI.java index e22c1a9b01..dffabda2c8 100644 --- a/app/src/main/java/eu/faircode/email/AI.java +++ b/app/src/main/java/eu/faircode/email/AI.java @@ -94,7 +94,7 @@ public class AI { } return sb.toString(); } else - return null; + throw new IllegalArgumentException("No AI available"); } static String getSummarizePrompt(Context context) { @@ -186,6 +186,6 @@ public class AI { } return sb.toString(); } else - return null; + throw new IllegalArgumentException("No AI available"); } }