throw '' whenever an interrupt is made (#365, #366)

This commit is contained in:
Mark Thom
2020-04-19 12:58:44 -06:00
parent 3798dcb98d
commit 5d6ca7a88e
4 changed files with 26 additions and 4 deletions

View File

@@ -154,6 +154,18 @@ impl MachineError {
)
}
#[inline]
pub(super)
fn interrupt_error() -> Self {
let stub = functor!("$interrupt_thrown");
MachineError {
stub,
location: None,
from: ErrorProvenance::Received,
}
}
pub(super)
fn evaluation_error(eval_error: EvalError) -> Self {
let stub = functor!("evaluation_error", [atom(eval_error.as_str())]);