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
parent 4dc1352032
commit 489f9f0fd5
No known key found for this signature in database
GPG key ID: F7AA2A8B65B50220

View file

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