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:
greg 2019-10-21 03:25:45 -07:00
parent 1493d12a22
commit f7357d4498
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ impl Schala {
let mut s = Schala::new_blank_env();
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
}