Skip to content

Commit

Permalink
Enable backtrace in anyhow
Browse files Browse the repository at this point in the history
This records backtraces when anyhow errors are created if
RUST_BACKTRACE is defined.
  • Loading branch information
espindola committed Nov 4, 2021
1 parent 872291d commit ff12f99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions cli/tests/test-wrapper.sh
Expand Up @@ -2,6 +2,9 @@

set -e

# Enables backtraces on panic and anyhow errors.
export RUST_BACKTRACE=1

export TEMPDIR=$(mktemp -d)

$CHISELD -m "sqlite://$TEMPDIR/chiseld.db?mode=rwc" -d "sqlite://$TEMPDIR/chiseld-data.db?mode=rwc" &
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.toml
Expand Up @@ -5,7 +5,7 @@ authors = ["ChiselStrike"]
edition = "2021"

[dependencies]
anyhow = "1.0"
anyhow = { version = "1.0.45", features = ["backtrace"] }
convert_case = "0.4.0"
deno_broadcast_channel = "0.17.0"
deno_core = "0.105.0"
Expand Down

0 comments on commit ff12f99

Please sign in to comment.