File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ fn main() {
27
27
}
28
28
```
29
29
30
-
31
30
## Motivation
32
31
33
32
In rust, there are two ways an operation can fail: An expected problem, like a
@@ -45,6 +44,7 @@ valid response if the route for that request (as in: logic outside of the web se
45
44
implementor's control) is producing a panic.
46
45
47
46
## Disadvantages
47
+
48
48
49
49
` panic::catch_unwind ` may not catch all panics in Rust. A panic in Rust is not always
50
50
implemented via unwinding, but can be implemented by aborting the process as well.
62
62
?-operator to propagate errors
63
63
explain why unwinding is bad
64
64
other disadvantages of panic::catch_unwind
65
+
65
66
+ "The example could be improved by adding a function and which panics and catching the panic
66
67
in the caller, then matching the Result. Describing the example you could show how by returning
67
68
a Result, the Result-ness of the function is described in the signature."
You can’t perform that action at this time.
0 commit comments