A deep survey of error handling approaches across C, Go, Rust, and Google's Abseil (absl::Status), grounded in the concept of error domains and blast radius. Starting from hardware-level CPU flags and watchdog timers, the post traces the evolution of error handling through errno, exceptions, Go's explicit error values, Absl's canonical gRPC status codes, and Rust's Result type with the ? operator. Key principles covered: contain failures to the right scope, keep the happy path readable, make errors easy to write and debug, and treat error handling as an organizational discipline. Rust's anyhow and thiserror crates are examined in depth, including pitfalls like accidental context loss through From conversions. The author concludes that Absl Status wins on standardization, Rust wins on ergonomics, and exceptions are workable with discipline but fail by default.
Sort: