WIP send panics to the repl more gracefully

This commit is contained in:
Richard Feldman 2022-10-30 03:12:41 -04:00
parent 45e800c328
commit a36ddbf6cb
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
5 changed files with 31 additions and 14 deletions

View file

@ -107,7 +107,11 @@ impl<'a> ReplApp<'a> for CliApp {
/// Run user code that returns a type with a `Builtin` layout
/// Size of the return value is statically determined from its Rust type
fn call_function<Return, F>(&mut self, main_fn_name: &str, mut transform: F) -> Expr<'a>
fn call_function<Return, F>(
&mut self,
main_fn_name: &str,
mut transform: F,
) -> Result<Expr<'a>, String>
where
F: FnMut(&'a Self::Memory, Return) -> Expr<'a>,
Self::Memory: 'a,