diff options
Diffstat (limited to 'rola-cli/src/lib.rs')
| -rw-r--r-- | rola-cli/src/lib.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/rola-cli/src/lib.rs b/rola-cli/src/lib.rs index f81c34e..54ff09a 100644 --- a/rola-cli/src/lib.rs +++ b/rola-cli/src/lib.rs @@ -1,4 +1,6 @@ -use mingling::macros::gen_program; +use std::process::exit; + +use mingling::macros::{gen_program, help}; pub mod res; pub mod tokio_wrapper; @@ -9,6 +11,15 @@ use bucket_mgr::*; mod error; use error::*; +#[help] +fn handle_error_dispatch_not_found(_err: ErrorDispatcherNotFound) { + let help = locale::helps::Basic::help().trim(); + + // Print directly to stderr and exit with code 0 + eprintln!("{}", help); + exit(0) +} + gen_program!(); pub mod locale { |
