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

@ -118,9 +118,9 @@ macro_rules! run_jit_function {
// only if there are no exceptions thrown, check for errors
assert!($errors.is_empty(), "Encountered errors:\n{}", $errors);
$transform(success)
Ok($transform(success))
}
Err(error_msg) => panic!("Roc failed with message: {}", error_msg),
Err(error_msg) => Err(error_msg.to_string()),
}
}};
}