Skip to content

Error backtraces for debugging testsΒ #1623

@Stebalien

Description

@Stebalien

The error crate we use, anyhow, supports backtraces. However, we can't use them right now for a few reasons:

  1. 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).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    πŸ“Œ Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions