Tags: #rust #errorhandling
anyhow
helps create error values out of arbitrary strings.
Helpful to wrap error messages that don’t need distinct types, which is often the case in applications that just end up logging the error and don’t need to distinguish between lots of types.
thiserror
helps make proper errors out of custom types (e.g. an enum with lots of different variants).
Helpful if you want to give each possible error its own type, which is often the case in libraries.