improve panic function, add stacktrace

This commit is contained in:
Mark
2024-06-19 12:35:23 +02:00
parent 4770e3f939
commit cd21c2171e
35 changed files with 367 additions and 232 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "mers"
version = "0.8.8"
version = "0.8.9"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "dynamically typed but type-checked programming language"
@@ -11,7 +11,7 @@ repository = "https://github.com/Dummi26/mers"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
mers_lib = "0.8.8"
mers_lib = "0.8.9"
# mers_lib = { path = "../mers_lib" }
clap = { version = "4.3.19", features = ["derive"] }
colored = "2.1.0"

View File

@@ -122,7 +122,10 @@ fn main() {
exit(255);
}
Ok(_) => {
compiled.run(&mut i2);
if let Err(e) = compiled.run(&mut i2) {
eprintln!("Error while running: {}", e);
std::process::exit(1);
}
}
},
}
@@ -145,7 +148,10 @@ fn main() {
exit(255);
}
Ok(compiled) => {
compiled.run(&mut i2);
if let Err(e) = compiled.run(&mut i2) {
eprintln!("Error while running: {}", e);
std::process::exit(1);
}
}
}
}