Add some debugging output for {create,retrieve,delete}

This commit is contained in:
Matthias Beyer 2016-02-09 17:17:41 +01:00
parent d85f985694
commit 00ccc22ef5

View file

@ -130,6 +130,7 @@ impl Store {
/// Creates the Entry at the given location (inside the entry)
pub fn create<'a>(&'a self, id: StoreId) -> Result<FileLockEntry<'a>> {
if !self.id_in_store(&id) {
debug!("'{:?}' seems not to be in '{:?}'", id, self.location);
return Err(StoreError::new(StoreErrorKind::StorePathOutsideStore, None));
}
@ -153,6 +154,7 @@ impl Store {
/// dropped, the new Entry is written to disk
pub fn retrieve<'a>(&'a self, id: StoreId) -> Result<FileLockEntry<'a>> {
if !self.id_in_store(&id) {
debug!("'{:?}' seems not to be in '{:?}'", id, self.location);
return Err(StoreError::new(StoreErrorKind::StorePathOutsideStore, None));
}
@ -213,6 +215,7 @@ impl Store {
/// Delete an entry
pub fn delete(&self, id: StoreId) -> Result<()> {
if !self.id_in_store(&id) {
debug!("'{:?}' seems not to be in '{:?}'", id, self.location);
return Err(StoreError::new(StoreErrorKind::StorePathOutsideStore, None));
}