Ir al contenido

Broad Exception Catch (ARCH8153)

Esta página aún no está disponible en tu idioma.

Key kotlin.logging.broad-exception-catch · Severity warning · Category logging

Flags catch (e: Exception) / catch (e: Throwable) outside top-level boundaries. Inside a coroutine ARCH8168 reports it instead, with the cancellation-specific fix.

try { load() } catch (e: Exception) { retry() }
try { load() } catch (e: IOException) { retry() }

Catch the specific exceptions the code can actually handle.