forked from M-Labs/nac3
[standalone] Explicit panic when encountering a compilation error
Otherwise scripts will continue to execute.
This commit is contained in:
parent
a43b59539c
commit
88d0ccbf69
|
@ -297,8 +297,7 @@ fn main() {
|
||||||
let program = match fs::read_to_string(file_name.clone()) {
|
let program = match fs::read_to_string(file_name.clone()) {
|
||||||
Ok(program) => program,
|
Ok(program) => program,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
println!("Cannot open input file: {err}");
|
panic!("Cannot open input file: {err}");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -340,8 +339,7 @@ fn main() {
|
||||||
unifier,
|
unifier,
|
||||||
primitives,
|
primitives,
|
||||||
) {
|
) {
|
||||||
eprintln!("{err}");
|
panic!("{err}");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// allow (and ignore) "from __future__ import annotations"
|
// allow (and ignore) "from __future__ import annotations"
|
||||||
|
|
Loading…
Reference in New Issue