Add params to EntryRenameError

This commit is contained in:
Matthias Beyer 2017-09-09 21:49:14 +02:00
parent 2ce2ba54da
commit b772908697
2 changed files with 3 additions and 8 deletions

View File

@ -164,14 +164,9 @@ error_chain! {
display("Encoding error")
}
StorePathError {
description("Store Path error")
display("Store Path error")
}
EntryRenameError {
EntryRenameError(old: PathBuf, new: PathBuf) {
description("Entry rename error")
display("Entry rename error")
display("Entry rename error: {:?} -> {:?}", old, new)
}
StoreIdHandlingError {

View File

@ -756,7 +756,7 @@ impl Store {
let new_id_pb = try!(new_id.clone().with_base(self.path().clone()).into_pathbuf());
match self.backend.rename(&old_id_pb, &new_id_pb) {
Err(e) => return Err(e).chain_err(|| SEK::EntryRenameError),
Err(e) => return Err(e).chain_err(|| SEK::EntryRenameError(old_id_pb, new_id_pb)),
Ok(_) => {
debug!("Rename worked on filesystem");