Skip to content

Commit 58ab00b

Browse files
committed
f debug_assert failed remove
1 parent 97d28e4 commit 58ab00b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning-persister/src/fs_store.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ impl KVStore for FilesystemStore {
226226
}
227227

228228
if dest_file_path.is_file() {
229-
return Err(std::io::Error::new(std::io::ErrorKind::Other, "Removing key failed"));
229+
debug_assert!(false, "Failed to remove {}/{}: file is still present.",
230+
PrintableString(namespace), PrintableString(key));
231+
let msg = format!("Failed to remove {}/{}: file is still present.",
232+
PrintableString(namespace), PrintableString(key));
233+
return Err(std::io::Error::new(std::io::ErrorKind::Other, msg));
230234
}
231235
}
232236

0 commit comments

Comments
 (0)