Hacker News new | ask | show | jobs
by waterTanuki 21 days ago
> Rust has three main error systems (io::Error, thiserror, and anyhow), which is a pain when you have to pass them upward through a chain of calls.

nit: Rust has three main Error implementations not systems. std::error::Error is a trait because it's left up to the user to provide project-specific error types, even if those types are anyhow::Errors. The system follows any implementation you use: ? syntax, .unwrap(), .expect(), handling, formatting, etc.

I've never had a problem using anyhow to pass errors up the call stack in any project I've used it in. What exactly is a pain?