add information to panic (#5177)
This commit is contained in:
parent
a3a91ba222
commit
d47caf2af8
|
@ -93,12 +93,17 @@ impl AppendVec {
|
||||||
.create(create)
|
.create(create)
|
||||||
.open(file)
|
.open(file)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
warn!("in current dir {:?}", std::env::current_dir());
|
let mut msg = format!("in current dir {:?}\n", std::env::current_dir());
|
||||||
for ancestor in file.ancestors() {
|
for ancestor in file.ancestors() {
|
||||||
warn!("{:?} is {:?}", ancestor, std::fs::metadata(ancestor));
|
msg.push_str(&format!(
|
||||||
|
"{:?} is {:?}\n",
|
||||||
|
ancestor,
|
||||||
|
std::fs::metadata(ancestor)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
panic!(
|
panic!(
|
||||||
"Unable to {} data file {}, err {:?}",
|
"{}Unable to {} data file {}, err {:?}",
|
||||||
|
msg,
|
||||||
if create { "create" } else { "open" },
|
if create { "create" } else { "open" },
|
||||||
file.display(),
|
file.display(),
|
||||||
e
|
e
|
||||||
|
|
Loading…
Reference in New Issue