logoalt Hacker News

lionkoryesterday at 9:12 PM2 repliesview on HN

> Rust lacks a uniform error type

Rust has practically one error, it's the Error trait. The things you've listed are some common ways to use it, but you're entirely fine with just Box<dyn Error> (which is basically what anyhow::Error is) and similar.


Replies

BobbyJoyesterday at 9:24 PM

Having many semantic options for error usage is functionally the same as having many error types, except worse.

show 2 replies
fweimeryesterday at 9:50 PM

Surely you need an alternative to Box<dyn Error> for reporting memory allocation failures?!

show 3 replies