October 2019
Intermediate to advanced
444 pages
10h 37m
English
Sometimes, there is no way for an execution thread to continue. This may be due to things such as invalid configuration files, unresponsive peers or servers, or OS-related errors. Rust has many ways to panic, explicitly or implicitly. The most ubiquitous one is probably unwrap() for multiple Option types and related types, which panic on error or None. Yet, for more complex programs, it is essential to take control of the panicking (for example, by avoiding multiple unwrap() calls and libraries that use it) and the panic! macro supports that.
Read now
Unlock full access