Aller au contenu

Empty Catch Block (ARCH8150)

Ce contenu n’est pas encore disponible dans votre langue.

Key kotlin.logging.empty-catch-block · Severity error · Category logging

Flags catch blocks with no statements - the failure disappears.

try { save() } catch (e: IOException) { }
try { save() } catch (e: IOException) { logger.error("save failed", e); throw e }

Log with the exception object, rethrow, or document why ignoring is correct.