Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
322c063450
commit
f44e10e295
|
@ -66,7 +66,9 @@ impl EditHeader for Entry {
|
||||||
fn edit_header_and_content(&mut self, rt: &Runtime) -> Result<()> {
|
fn edit_header_and_content(&mut self, rt: &Runtime) -> Result<()> {
|
||||||
let mut header_and_content = self.to_str()?;
|
let mut header_and_content = self.to_str()?;
|
||||||
let _ = edit_in_tmpfile(rt, &mut header_and_content)?;
|
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 New Issue