diff --git a/bin/core/imag-grep/Cargo.toml b/bin/core/imag-grep/Cargo.toml index fadbc8db..745dca99 100644 --- a/bin/core/imag-grep/Cargo.toml +++ b/bin/core/imag-grep/Cargo.toml @@ -20,6 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" } maintenance = { status = "actively-developed" } [dependencies] +log = "0.4" regex = "0.2" libimagstore = { version = "0.7.0", path = "../../../lib/core/libimagstore" } diff --git a/bin/core/imag-grep/src/main.rs b/bin/core/imag-grep/src/main.rs index 9da97ae0..f3868808 100644 --- a/bin/core/imag-grep/src/main.rs +++ b/bin/core/imag-grep/src/main.rs @@ -32,6 +32,7 @@ while_true, )] +#[macro_use] extern crate log; extern crate clap; extern crate regex; @@ -70,7 +71,10 @@ fn main() { .value_of("pattern") .map(Regex::new) .unwrap() // ensured by clap - .map_err_trace_exit_unwrap(1); + .unwrap_or_else(|e| { + error!("Regex building error: {:?}", e); + ::std::process::exit(1) + }); let overall_count = rt .store()