-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
Description
The error crate we use, anyhow, supports backtraces. However, we can't use them right now for a few reasons:
- We tend to extend errors turning them into strings then constructing a new anyhow error with some context. The correct approach is to use
my_anyhow_error.context(and friends). - When we have to turn an anyhow error into a string, we should prefer
{:?}where possible, or maybe just when debugging?{}will only include the last context,{:#}will include all context but no backtrace,{:?}will include everything.