4 ms·
Unwrap only appears in simplistic examples. The correct "unwrap" is the `try!` macro.
by the_mitsuhiko 12y ago
Unwrap only appears in simplistic examples. The correct "unwrap" is the `try!` macro.
- FreeFull 12y agoOnce you reach the main function, you have to deal with the errors, since you can't propagate them any further.
- the_mitsuhiko 12y agoYour main function is most likely pretty empty and that's the only place where you need to deal with hard failure. And that's the same in all languages. If you write in Python you don't just not handle exceptions either. Somewhere you catch them down and present them to the user in a good way.