5 ms·
Rust's panics and their backtrackes are essentially the same as C++ exceptions.
by dbaupp 8y ago
Rust's panics and their backtrackes are essentially the same as C++ exceptions.
- bluejekyll 8y agoI wasn’t actually thinking about panic, but the associated optional backtrace in Error types with Failure, for example: https://docs.rs/failure/0.1.3/failure/ https://docs.rs/failure/0.1.3/failure/
- dbaupp 8y agoAh, I see. Looking at the source code https://docs.rs/crate/failure/0.1.3/source/src/backtrace/internal.rs https://docs.rs/crate/failure/0.1.3/source/src/backtrace/int..., "failure" uses https://docs.rs/backtrace/0.3.9/backtrace/struct.Backtrace.html#method.new_unresolved https://docs.rs/backtrace/0.3.9/backtrace/struct.Backtrace.h... which is the callstack at a single point, not a trace of how an error was propagated.