closure_throw_guard

Macro closure_throw_guard 

Source
closure_throw_guard!() { /* proc-macro */ }
Expand description

§Description

wraps a function or closure, to prevent a thrown exception from propagating beyond them and turns unhandled exceptions to a panic

§Note

thrown exceptions do not trigger the panic hook so if this isn’t in the call chain before some code throws, the process might exit abruptly due to a panic with an unspecified load