Skip to content

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.

fun parse(s: String): Int? = try { s.toInt() } catch (e: NumberFormatException) { null }
fun parse(s: String): Int? = s.toIntOrNull()

Use a non-throwing API, or log the failure before returning a fallback.