pub fn handle<F, R>(func: F) -> Option<R>where F: FnOnce() -> Result<R>,
Execute the provided function and catch any errors. This is useful for closures where no error type can be returned by default.