Improve error message.
This commit is contained in:
parent
fc7d4bd949
commit
6c77586960
@ -512,7 +512,11 @@ pub fn compare_document<'s>(
|
||||
.ok_or("Should have a corresponding heading.")?;
|
||||
child_status.push(compare_heading(rust.source, token, corresponding_heading)?);
|
||||
} else {
|
||||
return Err("Document should only contain sections and headlines.".into());
|
||||
return Err(format!(
|
||||
"Document should only contain sections and headlines, found: {}",
|
||||
first_cell
|
||||
)
|
||||
.into());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user