We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
thread::catch_panic
1 parent d4d4206 commit a700546Copy full SHA for a700546
src/libstd/thread/mod.rs
@@ -434,9 +434,9 @@ pub fn panicking() -> bool {
434
435
/// Invokes a closure, capturing the cause of panic if one occurs.
436
///
437
-/// This function will return `Ok(())` if the closure does not panic, and will
438
-/// return `Err(cause)` if the closure panics. The `cause` returned is the
439
-/// object with which panic was originally invoked.
+/// This function will return `Ok` with the closure's result if the closure
+/// does not panic, and will return `Err(cause)` if the closure panics. The
+/// `cause` returned is the object with which panic was originally invoked.
440
441
/// It is currently undefined behavior to unwind from Rust code into foreign
442
/// code, so this function is particularly useful when Rust is called from
0 commit comments