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:
@@ -9,6 +9,7 @@ serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
docopt = "0.8"
|
||||
ethstore = { path = "../" }
|
||||
panic_hook = { path = "../../panic_hook" }
|
||||
|
||||
[[bin]]
|
||||
name = "ethstore"
|
||||
|
||||
@@ -20,6 +20,7 @@ extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate ethstore;
|
||||
extern crate panic_hook;
|
||||
|
||||
use std::{env, process, fs, fmt};
|
||||
use std::io::Read;
|
||||
@@ -134,6 +135,8 @@ impl fmt::Display for Error {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
panic_hook::set();
|
||||
|
||||
match execute(env::args()) {
|
||||
Ok(result) => println!("{}", result),
|
||||
Err(err) => {
|
||||
|
||||
Reference in New Issue
Block a user