Commit 1924e567 authored by Alexis Janon's avatar Alexis Janon
Browse files

Fixed errors introduced in bfead0fa

Was displaying an Option<PathBuf> with a debug print. However, at that
point this option is necessarily None, therefore the error did not add
much more information. It now prints the key and slice name.
parent 09673e7a
...@@ -57,7 +57,7 @@ impl Command for FindGetSetValue { ...@@ -57,7 +57,7 @@ impl Command for FindGetSetValue {
); );
let path = match self.path { let path = match self.path {
Some(ref value) => value, Some(ref value) => value,
None => return Err(Error::from(format!("Missing previous value for path {}. (probably an internal bug, you should report it)", self.path.display()))) None => return Err(Error::from(format!("Missing previous path value to key {} for slice {}. (probably an internal bug, you should report it)", self.name, self.key)))
}; };
if let Err(err) = self.controllers.check_path(&path) { if let Err(err) = self.controllers.check_path(&path) {
return Err(err); return Err(err);
...@@ -110,7 +110,7 @@ impl Command for FindGetSetValue { ...@@ -110,7 +110,7 @@ impl Command for FindGetSetValue {
)?); )?);
match self.path { match self.path {
Some(ref value) => value, Some(ref value) => value,
None => return Err(Error::from(format!("{{rollback}} Missing previous value for path {}. (probably an internal bug, you should report it)", self.path.display()))) None => return Err(Error::from(format!("{{rollback}} Missing previous path value to key {} for slice {}. (probably an internal bug, you should report it)", self.name, self.key)))
} }
} }
}; };
...@@ -123,7 +123,7 @@ impl Command for FindGetSetValue { ...@@ -123,7 +123,7 @@ impl Command for FindGetSetValue {
); );
let old_value = match self.old_value { let old_value = match self.old_value {
Some(ref value) => value, Some(ref value) => value,
None => return Err(Error::from(format!("{{rollback}} Missing previous value for path {}, cannot rollback. (probably an internal bug, you should report it)", self.path.display()))) None => return Err(Error::from(format!("{{rollback}} Missing previous value for path {}, cannot rollback. (probably an internal bug, you should report it)", path.display())))
}; };
trace!( trace!(
"{{rollback}} New value: `{}`. Old value: `{}`", "{{rollback}} New value: `{}`. Old value: `{}`",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment