Add explicit panic for prelude errors
Maybe I want to handle this better in the future, but for now just panic if the prelude is bad for some reason.
This commit is contained in:
parent
1493d12a22
commit
f7357d4498
@ -51,7 +51,10 @@ impl Schala {
|
|||||||
let mut s = Schala::new_blank_env();
|
let mut s = Schala::new_blank_env();
|
||||||
|
|
||||||
let request = ComputationRequest { source: prelude, debug_requests: HashSet::default() };
|
let request = ComputationRequest { source: prelude, debug_requests: HashSet::default() };
|
||||||
s.run_computation(request);
|
let response = s.run_computation(request);
|
||||||
|
if let Err(msg) = response.main_output {
|
||||||
|
panic!("Error in prelude, panicking: {}", msg);
|
||||||
|
}
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user