Add panic hook that shows stacktrace

This commit is contained in:
Dheepak Krishnamurthy 2021-02-05 09:31:05 -07:00
parent cf918a53ff
commit 79f1b9c1e6
4 changed files with 83 additions and 6 deletions

68
Cargo.lock generated
View file

@ -61,6 +61,16 @@ dependencies = [
"rustc-demangle",
]
[[package]]
name = "better-panic"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d12a680cc74d8c4a44ee08be4a00dedf671b089c2440b2e3fdaa776cd468476"
dependencies = [
"backtrace",
"console",
]
[[package]]
name = "bitflags"
version = "1.2.1"
@ -119,6 +129,18 @@ dependencies = [
"vec_map",
]
[[package]]
name = "clicolors-control"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e"
dependencies = [
"atty",
"lazy_static",
"libc",
"winapi",
]
[[package]]
name = "cloudabi"
version = "0.0.3"
@ -128,6 +150,21 @@ dependencies = [
"bitflags",
]
[[package]]
name = "console"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45e0f3986890b3acbc782009e2629dfe2baa430ac091519ce3be26164a2ae6c0"
dependencies = [
"clicolors-control",
"encode_unicode",
"lazy_static",
"libc",
"regex",
"termios",
"winapi",
]
[[package]]
name = "crossterm"
version = "0.17.7"
@ -240,6 +277,12 @@ version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "encode_unicode"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "failure"
version = "0.1.8"
@ -535,6 +578,21 @@ dependencies = [
"redox_syscall",
]
[[package]]
name = "regex"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a"
dependencies = [
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.6.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
[[package]]
name = "rustc-demangle"
version = "0.1.18"
@ -702,6 +760,7 @@ dependencies = [
name = "taskwarrior-tui"
version = "0.9.9"
dependencies = [
"better-panic",
"cassowary",
"chrono",
"clap",
@ -719,6 +778,15 @@ dependencies = [
"uuid",
]
[[package]]
name = "termios"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b"
dependencies = [
"libc",
]
[[package]]
name = "textwrap"
version = "0.11.0"