Fix incorrectly caught exception
This commit is contained in:
parent
657796c8b5
commit
98ce9899ff
|
@ -1046,7 +1046,7 @@ class TimelineViewModel @AssistedInject constructor(
|
|||
val event = try {
|
||||
room.reportingService().reportContent(action.eventId, -100, action.reason)
|
||||
RoomDetailViewEvents.ActionSuccess(action)
|
||||
} catch (failure: Exception) {
|
||||
} catch (failure: Throwable) {
|
||||
RoomDetailViewEvents.ActionFailure(action, failure)
|
||||
}
|
||||
_viewEvents.post(event)
|
||||
|
|
|
@ -271,7 +271,7 @@ class RoomListViewModel @AssistedInject constructor(
|
|||
viewModelScope.launch {
|
||||
try {
|
||||
room.roomPushRuleService().setRoomNotificationState(action.notificationState)
|
||||
} catch (failure: Exception) {
|
||||
} catch (failure: Throwable) {
|
||||
_viewEvents.post(RoomListViewEvents.Failure(failure))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ class HomeRoomListViewModel @AssistedInject constructor(
|
|||
viewModelScope.launch {
|
||||
try {
|
||||
room.roomPushRuleService().setRoomNotificationState(action.notificationState)
|
||||
} catch (failure: Exception) {
|
||||
} catch (failure: Throwable) {
|
||||
_viewEvents.post(HomeRoomListViewEvents.Failure(failure))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue