Swallowed Exception (ARCH8151)
هذا المحتوى غير متوفر بلغتك بعد.
Key kotlin.logging.swallowed-exception · Severity error · Category logging
Flags catch blocks that return null/default or continue without logging or rethrowing.
Incorrect
Section titled “Incorrect”fun parse(s: String): Int? = try { s.toInt() } catch (e: NumberFormatException) { null }Correct
Section titled “Correct”fun parse(s: String): Int? = s.toIntOrNull()Use a non-throwing API, or log the failure before returning a fallback.