From 78d76bcbc65b5ad4a1a12a05df5ad2225793a033 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 28 Oct 2020 20:47:16 -0500 Subject: [PATCH] fix: Be friendlier about error messages --- src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 402d933..fcfd8d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,13 @@ mod dict; mod replace; fn main() { - let code = run().unwrap(); + let code = match run() { + Ok(code) => code, + Err(err) => { + eprintln!("{}", err); + 1 + } + }; std::process::exit(code); }