Open strohel opened 11 months ago
Personally, for this prototyping phase I'm OK with anyhow
. As an alternative we could use eyre
, which I haven't used for any personal project yet but I hear is pretty good (I kinda remember one of you using it for something, but I'm not sure)
I don't think the two approaches are exclusive, thiserror
to define good errors where they make sense and anyhow
/ eyre
for error reporting.
Even for a prototype it would be nice to have a little bit of library code, I'm not super fond of having everything in main.rs.
@PabloMansanet we were using eyre in my evaluation project 😉 The advantage over anyhow is probably the nicely colored output. .)
Currently we do just
.expect()
, which doesn't scale.Do people (@mbernat?) have opinions on "dynamic" errors (
anyhow
) vs. more statically defined (thiserror
)?If we target being a library, then static
thiserror
-like errors are more appropriate, but I wonder if that isn't an overkill doing now in the prototyping phase. (we should start withanyhow
and eventually convert tothiserror
).And meybe there's some alternative to the 2 mentioned libraries?