تخطَّ إلى المحتوى

Broad Exception Catch (ARCH8153)

هذا المحتوى غير متوفر بلغتك بعد.

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.