diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 74b1bc5..43d938e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,20 +1,30 @@ mod cmd; +mod hash; mod mnemonic; +mod rand; use crate::cmd::*; +use std::process; use structopt::StructOpt; #[derive(Debug, StructOpt)] #[structopt( name = "hdwallet", - about = "Hierarchical deterministic wallet for Ethereum", + about = "Hierarchical deterministic wallet for Ethereum" )] enum Options { New(new::Options), } fn main() { - match Options::from_args() { + if let Err(err) = match Options::from_args() { Options::New(options) => new::run(options), + } { + if cfg!(debug_assertions) { + eprintln!("ERROR: {:?}", err); + } else { + eprintln!("ERROR: {}", err); + } + process::exit(-1); } } |
