From 0f4443d171ebde023fd0bd58b8499e363dd7f35f Mon Sep 17 00:00:00 2001 From: NerdyPepper Date: Fri, 29 Mar 2019 20:00:31 +0530 Subject: closes #2 --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e03d338..ddad9b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,7 +44,10 @@ fn main() { let evaled = eval_math_expression(&expr[..]); match evaled { Ok(ans) => println!("{}", ans), - Err(e) => eprintln!("{}", handler(e)), + Err(e) => { + eprintln!("{}", handler(e)); + std::process::exit(1); + }, }; } else { let config_builder = Builder::new(); -- cgit v1.2.3