pub fn catch_panic<T>(work: impl FnOnce() -> T) -> Result<T, String>Expand description
Run work, turning a panic into a message for the user. The hook has already
logged the panic with its backtrace; the message says where. A panic on a Polars
thread that this work was waiting on is resumed here, so it is reported here too.