Skip to main content

Module caught_panic

Module caught_panic 

Source
Expand description

Ported code mimics a Java exception with a panic, caught where the JVM tool catches the exception (ktlint’s rule boundary, ktfmt’s per-file catch). The default panic hook would still print each one to stderr, which the jar does not; silence_caught_panics keeps those quiet.

Functions§

catch_quietly
catch_unwind, marking the panics it catches as expected (silent once the hook is installed).
silence_caught_panics
Installs (once per process) a panic hook that stays quiet for panics catch_quietly catches; any other panic still prints.