switch to representation error for partial strings (#267)

This commit is contained in:
Mark Thom
2020-03-01 23:21:35 -07:00
parent d8e0bea110
commit 2d3ce32314

View File

@@ -944,9 +944,8 @@ impl MachineState {
}
None => {
let stub = MachineError::functor_stub(clause_name!("partial_string"), 3);
let err = MachineError::type_error(
ValidType::Character,
Addr::Con(Constant::Char('\u{0}')),
let err = MachineError::representation_error(
RepFlag::Character,
);
return Err(self.error_form(err, stub));