propagate syntax errors from read_term when they're not UnexpectedEOF (#507)
This commit is contained in:
@@ -730,14 +730,17 @@ impl MachineState {
|
|||||||
if orig_stream.options.eof_action == EOFAction::Reset {
|
if orig_stream.options.eof_action == EOFAction::Reset {
|
||||||
if self.fail == false {
|
if self.fail == false {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user