Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
322c063450
commit
f44e10e295
1 changed files with 3 additions and 1 deletions
|
@ -66,7 +66,9 @@ impl EditHeader for Entry {
|
|||
fn edit_header_and_content(&mut self, rt: &Runtime) -> Result<()> {
|
||||
let mut header_and_content = self.to_str()?;
|
||||
let _ = edit_in_tmpfile(rt, &mut header_and_content)?;
|
||||
self.replace_from_buffer(&header_and_content).map_err(Error::from)
|
||||
self.replace_from_buffer(&header_and_content)
|
||||
.context("Failed to replace header and content from buffer")
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue