From 878067368a6f77b9bc8a58e5bac84a2486534870 Mon Sep 17 00:00:00 2001 From: Grishka Date: Mon, 18 Nov 2024 15:22:49 +0300 Subject: [PATCH] Still a good idea to throw exception in debug builds tho --- .../joinmastodon/android/api/session/AccountSessionManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java b/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java index 9d61a8cd..afc14e10 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java @@ -451,6 +451,8 @@ public class AccountSessionManager{ if(i!=null) return i; Log.e(TAG, "Instance info for "+domain+" was not found. This should normally never happen. Returning fake instance object"); + if(BuildConfig.DEBUG) + throw new IllegalStateException("Instance info for "+domain+" missing"); InstanceV1 fake=new InstanceV1(); fake.uri=fake.title=domain; fake.description=fake.version=fake.email="";