We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de0e8e6 commit 358d7daCopy full SHA for 358d7da
src/error-handling/panic-unwind.md
@@ -7,17 +7,17 @@ use std::panic;
7
8
fn main() {
9
let result = panic::catch_unwind(|| {
10
- println!("hello!");
+ "No problem here!"
11
});
12
- assert!(result.is_ok());
13
-
+ println!("{result:?}");
+
14
15
panic!("oh no!");
16
17
- assert!(result.is_err());
18
}
19
```
20
21
-* This can be useful in servers which should keep running even if a single
+- This can be useful in servers which should keep running even if a single
22
request crashes.
23
-* This does not work if `panic = 'abort'` is set in your `Cargo.toml`.
+- This does not work if `panic = 'abort'` is set in your `Cargo.toml`.
0 commit comments