use color_eyre for its backtrace feature and error reporting (#1855)

* use color_eyre for its backtrace feature and error reporting

* lost Cargo.lock update

* wrapper

* add error glue to be able to utilize eyre

* Update src/main.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update src/main.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* avoid duplicate error print

* Update src/main.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
Bernhard Schuster
2020-10-27 22:31:57 +01:00
committed by GitHub
parent 65106d7792
commit 5fbb8a381c
3 changed files with 103 additions and 2 deletions
+59
View File
@@ -752,6 +752,32 @@ dependencies = [
"bitflags",
]
[[package]]
name = "color-eyre"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2a5123db5af8349c41c43ed0e5dca1cd56c911ea0c4ce6e6ff30f159fa5d27e"
dependencies = [
"backtrace",
"color-spantrace",
"eyre",
"indenter",
"once_cell 1.4.1",
"owo-colors",
"tracing-error",
]
[[package]]
name = "color-spantrace"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a99aa4aa18448eef4c7d3f86d2720d2d8cad5c860fe9ff9b279293efdc8f5be"
dependencies = [
"ansi_term 0.11.0",
"tracing-core",
"tracing-error",
]
[[package]]
name = "concurrent-queue"
version = "1.2.2"
@@ -1297,6 +1323,16 @@ dependencies = [
"futures 0.3.5",
]
[[package]]
name = "eyre"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c5cb4dc433c59f09df4b4450f649cbfed61e8a3505abe32e4154066439157e"
dependencies = [
"indenter",
"once_cell 1.4.1",
]
[[package]]
name = "failure"
version = "0.1.8"
@@ -2315,6 +2351,12 @@ dependencies = [
"syn 1.0.33",
]
[[package]]
name = "indenter"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0bd112d44d9d870a6819eb505d04dd92b5e4d94bb8c304924a0872ae7016fb5"
[[package]]
name = "indexmap"
version = "1.4.0"
@@ -3767,6 +3809,12 @@ dependencies = [
"stable_deref_trait",
]
[[package]]
name = "owo-colors"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a1250cdd103eef6bd542b5ae82989f931fc00a41a27f60377338241594410f3"
[[package]]
name = "pallet-authority-discovery"
version = "2.0.0"
@@ -4700,6 +4748,7 @@ name = "polkadot"
version = "0.8.26"
dependencies = [
"assert_cmd",
"color-eyre",
"futures 0.3.5",
"nix 0.17.0",
"parity-util-mem",
@@ -9251,6 +9300,16 @@ dependencies = [
"lazy_static",
]
[[package]]
name = "tracing-error"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4d7c0b83d4a500748fa5879461652b361edf5c9d51ede2a2ac03875ca185e24"
dependencies = [
"tracing",
"tracing-subscriber",
]
[[package]]
name = "tracing-futures"
version = "0.2.4"