Add params to EntryRenameError
This commit is contained in:
parent
2ce2ba54da
commit
b772908697
2 changed files with 3 additions and 8 deletions
|
@ -164,14 +164,9 @@ error_chain! {
|
||||||
display("Encoding error")
|
display("Encoding error")
|
||||||
}
|
}
|
||||||
|
|
||||||
StorePathError {
|
EntryRenameError(old: PathBuf, new: PathBuf) {
|
||||||
description("Store Path error")
|
|
||||||
display("Store Path error")
|
|
||||||
}
|
|
||||||
|
|
||||||
EntryRenameError {
|
|
||||||
description("Entry rename error")
|
description("Entry rename error")
|
||||||
display("Entry rename error")
|
display("Entry rename error: {:?} -> {:?}", old, new)
|
||||||
}
|
}
|
||||||
|
|
||||||
StoreIdHandlingError {
|
StoreIdHandlingError {
|
||||||
|
|
|
@ -756,7 +756,7 @@ impl Store {
|
||||||
let new_id_pb = try!(new_id.clone().with_base(self.path().clone()).into_pathbuf());
|
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) {
|
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(_) => {
|
Ok(_) => {
|
||||||
debug!("Rename worked on filesystem");
|
debug!("Rename worked on filesystem");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue