Rethrow Loses Stack Trace (ARCH8154)
Esta página aún no está disponible en tu idioma.
Key kotlin.logging.rethrow-loses-stack-trace · Severity warning · Category logging
Flags throwing a new exception inside a catch block without passing the caught one as cause.
Incorrect
Section titled “Incorrect”catch (e: SQLException) { throw RepositoryException("load failed") }Correct
Section titled “Correct”catch (e: SQLException) { throw RepositoryException("load failed", e) }Pass the original exception as the cause.