write logs for exceptions in viewModel

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2024-11-18 18:54:38 +01:00 committed by Marcel Hibbe
parent fa3e8002bc
commit ebfb38b5b5
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -159,6 +159,7 @@ class ConversationInfoViewModel @Inject constructor(
_getTalkBanState.value = ListBansSuccessState(listBans) _getTalkBanState.value = ListBansSuccessState(listBans)
} catch (exception: Exception) { } catch (exception: Exception) {
_getTalkBanState.value = ListBansErrorState _getTalkBanState.value = ListBansErrorState
Log.e(TAG, "Error while getting list of banned participants", exception)
} }
} }
} }
@ -177,6 +178,7 @@ class ConversationInfoViewModel @Inject constructor(
_getBanActorState.value = BanActorSuccessState(talkBan) _getBanActorState.value = BanActorSuccessState(talkBan)
} catch (exception: Exception) { } catch (exception: Exception) {
_getBanActorState.value = BanActorErrorState _getBanActorState.value = BanActorErrorState
Log.e(TAG, "Error banning a participant", exception)
} }
} }
} }
@ -200,6 +202,7 @@ class ConversationInfoViewModel @Inject constructor(
_getUnBanActorState.value = UnBanActorSuccessState _getUnBanActorState.value = UnBanActorSuccessState
} catch (exception: Exception) { } catch (exception: Exception) {
_getUnBanActorState.value = UnBanActorErrorState _getUnBanActorState.value = UnBanActorErrorState
Log.e(TAG, "Error while unbanning a participant", exception)
} }
} }
} }