https://kotlinlang.org logo
Title
u

user

07/09/2022, 6:31 AM
Thrown exception is not caught properly, causing my app to crash I have these two functions override suspend fun getUser(loadUserImage: Boolean): BaseResult = withContext(realmWriteDispatcher) { getResult { RealmDb.useRealm { user()?.mapToUser() } } } private fun Realm.user(): RealmUser { findFirst()?.let { return it } sessionRepository.logout() loginNavigation.onLoggedOut() throw UserNotFoundException() } Basically anywhere in the app, you can fetch the...