Throw From Finally (ARCH8155)
Key kotlin.logging.throw-from-finally · Severity error · Category logging
Flags throw inside a finally block - it masks the exception that was already propagating.
Incorrect
Section titled “Incorrect”try { work() } finally { throw IllegalStateException("late") }Correct
Section titled “Correct”try { work() } finally { cleanup() }Never throw from finally; handle cleanup failures separately.