Detekt: enable rule exceptions.SwallowedException and fix existing issue.

This commit is contained in:
Benoit Marty 2025-12-05 09:45:23 +01:00
parent d0df2cd088
commit 54e742075d
16 changed files with 20 additions and 20 deletions

View file

@ -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")
}
}
}

View file

@ -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 {

View file

@ -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
}
}