1
0
forked from M-Labs/nac3

[standalone] Explicit panic when encountering a compilation error

Otherwise scripts will continue to execute.
This commit is contained in:
David Mak 2024-10-03 12:49:07 +08:00
parent a43b59539c
commit 88d0ccbf69

View File

@ -297,8 +297,7 @@ fn main() {
let program = match fs::read_to_string(file_name.clone()) {
Ok(program) => program,
Err(err) => {
println!("Cannot open input file: {err}");
return;
panic!("Cannot open input file: {err}");
}
};
@ -340,8 +339,7 @@ fn main() {
unifier,
primitives,
) {
eprintln!("{err}");
return;
panic!("{err}");
}
}
// allow (and ignore) "from __future__ import annotations"