Add more context in error messages
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
6e0a179550
commit
322c063450
|
@ -92,6 +92,9 @@ impl EntryDate for Entry {
|
|||
|
||||
self.get_header_mut()
|
||||
.insert(&DATE_HEADER_LOCATION, Value::String(date))
|
||||
.context(format_err!("Failed to insert header '{}' in '{}'",
|
||||
*DATE_HEADER_LOCATION,
|
||||
self.get_location()))
|
||||
.map_err(Error::from)
|
||||
.map(|opt| opt.map(|stri| {
|
||||
stri.as_str()
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
)]
|
||||
|
||||
#[macro_use] extern crate lazy_static;
|
||||
#[macro_use] extern crate failure;
|
||||
extern crate chrono;
|
||||
extern crate toml_query;
|
||||
extern crate toml;
|
||||
extern crate failure;
|
||||
|
||||
extern crate libimagerror;
|
||||
extern crate libimagstore;
|
||||
|
|
Loading…
Reference in New Issue