propagate syntax errors from read_term when they're not UnexpectedEOF
@@ -730,14 +730,17 @@ fn read_term(
if orig_stream.options.eof_action == EOFAction::Reset {
if self.fail == false {
continue;
- } else {
- return Ok(());
- }
}
}
return Ok(());
}
+
+ let stub = MachineError::functor_stub(clause_name!("read_term"), 3);
+ let err = MachineError::syntax_error(self.heap.h(), err);
+
+ return Err(self.error_form(err, stub));
+ }
}
}
}
