headcrab
headcrab copied to clipboard
Implement proper error types
Currently, all error types are returned as Box<dyn std::error::Error>
, which is a quick & dirty way of doing it.
We should have descriptive error types.
@nbaksalyar Do we have a preference for a crate that we want to use here ? Would Anyhow work ?
Anyhow is for executables. It doesn't allow you to match on the error. Something like thiserror makes more sense. That crate makes it easier to derive Error for regular enums.
Makes sense.
Is this issue still open I'd be interested in taking a look at adding an error type. Would you rather use thiserror
or do it the long way with a bunch of Into
impls?
Using thiserror is probably easier.