pub fn protected_call<T, F>(op: F) -> Result<T, String>where
F: FnOnce() -> T + UnwindSafe,Expand description
Wrap a potentially-panicking plugin call in catch_unwind.
Returns the closure’s result on success, or an error string if it panics.
pub fn protected_call<T, F>(op: F) -> Result<T, String>where
F: FnOnce() -> T + UnwindSafe,Wrap a potentially-panicking plugin call in catch_unwind.
Returns the closure’s result on success, or an error string if it panics.