3 ms·
This is how it's done in Rust. panic macro unwinds stack for tracebacks, there's std::panic::catch_unwind, but panic can be compiled to be aborts to do away wit
by __s 7y ago
This is how it's done in Rust. panic macro unwinds stack for tracebacks, there's std::panic::catch_unwind, but panic can be compiled to be aborts to do away with stack unwinding, error handling is meant to be done with Result<T, E> type, whereas panic is meant for unrecoverable errors
- riwsky 7y agoThis is not an apples-to-apples comparison. In Rust, app code can panic, even though it’s not idiomatic. That does not meet the standard prescribed by the quote from the article.