diff --git a/runtime/src/append_vec.rs b/runtime/src/append_vec.rs index 27a83838f9..5eb23f43dd 100644 --- a/runtime/src/append_vec.rs +++ b/runtime/src/append_vec.rs @@ -117,7 +117,10 @@ pub struct AppendVec { impl Drop for AppendVec { fn drop(&mut self) { if self.remove_on_drop { - let _ignored = remove_file(&self.path); + if let Err(e) = remove_file(&self.path) { + // promote this to panic soon. + error!("AppendVec failed to remove {:?}: {:?}", &self.path, e); + } } } } @@ -138,19 +141,11 @@ impl AppendVec { .create(create) .open(file) .map_err(|e| { - let mut msg = format!("in current dir {:?}\n", std::env::current_dir()); - for ancestor in file.ancestors() { - msg.push_str(&format!( - "{:?} is {:?}\n", - ancestor, - std::fs::metadata(ancestor) - )); - } panic!( - "{}Unable to {} data file {}, err {:?}", - msg, + "Unable to {} data file {} in current dir({:?}): {:?}", if create { "create" } else { "open" }, file.display(), + std::env::current_dir(), e ); })