mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:05:28 +00:00
Detekt: enable rule exceptions.SwallowedException and fix existing issue.
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ suspend fun RoomList.awaitLoaded(timeout: Duration = Duration.INFINITE) {
|
||||
it is RoomList.LoadingState.Loaded
|
||||
}
|
||||
}
|
||||
} catch (timeoutException: TimeoutCancellationException) {
|
||||
} catch (_: TimeoutCancellationException) {
|
||||
Timber.d("awaitAllRoomsAreLoaded: no response after $timeout")
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ class RoomSyncSubscriber(
|
||||
}
|
||||
subscribedRoomIds.add(roomId)
|
||||
} catch (exception: Exception) {
|
||||
Timber.e("Failed to subscribe to room $roomId")
|
||||
Timber.e(exception, "Failed to subscribe to room $roomId")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ fun RoomListInterface.loadingStateFlow(): Flow<RoomListLoadingState> =
|
||||
try {
|
||||
send(result.state)
|
||||
} catch (exception: Exception) {
|
||||
Timber.d("loadingStateFlow() initialState failed.")
|
||||
Timber.d(exception, "loadingStateFlow() initialState failed.")
|
||||
}
|
||||
result.stateStream
|
||||
}.catch {
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ class RustWidgetDriver(
|
||||
override suspend fun send(message: String) {
|
||||
try {
|
||||
driverAndHandle.handle.send(message)
|
||||
} catch (e: IllegalStateException) {
|
||||
} catch (_: IllegalStateException) {
|
||||
// The handle is closed, ignore
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user