From 7a972465ead33323f1bacb35e17b016b6949aadd Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 25 Mar 2020 14:27:10 -0400 Subject: [DEV-7087] TAMER: tameld: Format error output We will want an option for verbose debug output in the future. --- tamer/src/bin/tameld.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tamer/src/bin/tameld.rs') diff --git a/tamer/src/bin/tameld.rs b/tamer/src/bin/tameld.rs index e3ca4b0..bf91e94 100644 --- a/tamer/src/bin/tameld.rs +++ b/tamer/src/bin/tameld.rs @@ -45,7 +45,15 @@ pub fn main() -> Result<(), Box> { let usage = opts.usage(&format!("Usage: {} -o OUTPUT FILE", program)); match parse_options(opts, args) { - Ok(Command::Link(input, output)) => poc::main(&input, &output), + Ok(Command::Link(input, output)) => match poc::main(&input, &output) { + Err(e) => { + eprintln!("error: {}", e); + eprintln!("fatal: failed to link `{}`", output); + + std::process::exit(1); + } + ok => ok, + }, Ok(Command::Usage) => { println!("{}", usage); std::process::exit(exitcode::OK); -- cgit v1.2.1