this post was submitted on 20 Mar 2026
10 points (100.0% liked)
Rust Programming
9206 readers
8 users here now
founded 7 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The error returns a stack trace like this because if you return
Err(anyhow::Error)from your main function, it debug prints the error when it exits.As you mentioned, it's very convenient during logging! The
Displayimpl shows much less information, so usually you want theDebuginfo ofanyhow::Errorduring logging.