Better error messages.

This commit is contained in:
Tom Alexander 2023-10-11 19:05:39 -04:00
parent efc6bd11d9
commit 4a44d88461
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -484,8 +484,11 @@ pub(crate) fn compare_property_list_of_list_of_list_of_ast_nodes<
if rust_optional.len() != middle_value.len() {
let this_status = DiffStatus::Bad;
let message = Some(format!(
"{} mismatch (emacs != rust) {:?} != {:?}",
emacs_field, value, rust_value
"{} optional value length mismatch (emacs != rust) {} != {} | {:?}",
emacs_field,
middle_value.len(),
rust_optional.len(),
rust_optional
));
return Ok(ComparePropertiesResult::SelfChange(this_status, message));
}
@ -500,8 +503,11 @@ pub(crate) fn compare_property_list_of_list_of_list_of_ast_nodes<
if rust_value.len() != mandatory_value.len() {
let this_status = DiffStatus::Bad;
let message = Some(format!(
"{} mismatch (emacs != rust) {:?} != {:?}",
emacs_field, value, rust_value
"{} mandatory value length mismatch (emacs != rust) {} != {} | {:?}",
emacs_field,
mandatory_value.len(),
rust_value.len(),
rust_value
));
return Ok(ComparePropertiesResult::SelfChange(this_status, message));
}