Expand description
Catch-unwind wrapper used by every plug-in extern "C" thunk.
Unwinding across an FFI boundary is undefined behaviour, so every host-bound
call from a plug-in must be wrapped to convert a panic into a returned
PluginError with code PluginErrorCode::Panic.
Functionsยง
- drop_
payload - Drops a panic payload while suppressing any unwind from its
Dropimpl. - guard
- Wraps a closure in
catch_unwindand maps a panic to aPluginError. - guard_
infallible - Runs a closure under
catch_unwindfor thunks whose return type cannot carry aPluginError(e.g.extern "C" fn(...) -> u64).