Function catch_unwind_optimize

Source
pub fn catch_unwind_optimize<Opt, To, E>(optimization: Opt) -> Result<To, E>
where Opt: FnOnce() -> Result<To, E>, E: From<TransformError> + MaybeShouldPanic,
Expand description

Catch panics in the given optimization, and demote them to TransformError::Internal error.

Additionally, if the result of the optimization is an error (not a panic) that indicates we should panic, then panic.