Add custom panic hook

The panic hook prints a backtrace, the panic message, file, and line
number, and a plea to report bugs.
This commit is contained in:
Brian Anderson
2017-07-03 06:31:29 +01:00
parent 4c32177ef3
commit 6345b54034
11 changed files with 120 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate ethkey;
extern crate panic_hook;
use std::{env, fmt, process};
use std::num::ParseIntError;
@@ -155,6 +156,8 @@ impl DisplayMode {
}
fn main() {
panic_hook::set();
match execute(env::args()) {
Ok(ok) => println!("{}", ok),
Err(err) => {