Skip to content

Commit 4473be7

Browse files
committed
Suppress TooGenericExceptionCaught in event loop catch-all handlers.
1 parent c42e417 commit 4473be7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

BTLib/src/main/kotlin/com/offsetnull/bt/service/ConnectionEventLoop.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ConnectionEventLoop(
2424
for (command in channel) {
2525
try {
2626
dispatcher.dispatch(command)
27-
} catch (e: Exception) {
27+
} catch (@Suppress("TooGenericExceptionCaught") e: Exception) {
2828
android.util.Log.e("ConnectionEventLoop", "Error dispatching $command", e)
2929
}
3030
}

BTLib/src/main/kotlin/com/offsetnull/bt/service/ServiceEventLoop.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ServiceEventLoop(
3939
sideEffects.onSwitchTo(command.display)
4040
else -> {}
4141
}
42-
} catch (e: Exception) {
42+
} catch (@Suppress("TooGenericExceptionCaught") e: Exception) {
4343
Log.e("ServiceEventLoop", "Error dispatching $command", e)
4444
}
4545
}

0 commit comments

Comments
 (0)