throw exceptions when calling non-existent predicates. broken.

This commit is contained in:
Mark Thom
2018-04-08 15:17:58 -06:00
parent 32ebe1a47f
commit fe481fedce
6 changed files with 90 additions and 48 deletions

View File

@@ -909,8 +909,8 @@ impl MachineState {
self.registers[arity - 1] = pred;
if let Some((name, arity)) = self.setup_call_n(arity - 1) {
if let Some(idx) = code_dirs.get(name, arity, &self.p.clone()) {
try_or_fail!(self, call_policy.try_execute(self, arity, idx));
if let Some(idx) = code_dirs.get(name.clone(), arity, &self.p.clone()) {
try_or_fail!(self, call_policy.try_execute(self, name, arity, idx));
return;
}
}