Update error handling for a more beautiful look

This commit is contained in:
Ivan Bushchik 2023-01-25 22:49:48 +03:00 committed by GitHub
parent ebfe95e632
commit 2481dfd3aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ fn main_loop() {
let result = evalexpr::eval(&input.trim()); let result = evalexpr::eval(&input.trim());
match result { match result {
Ok(succ_res) => println!("{}", succ_res), Ok(succ_res) => println!("{}", succ_res),
Err(_) => println!("Invalid input") Err(err) => println!("Error: {}", err)
} }
input.clear(); input.clear();
print!(">>> "); print!(">>> ");