Improve error reporting

This commit is contained in:
Michael Vines
2018-06-15 15:29:43 -07:00
parent 04d1a083fa
commit 15c7f36ea3
2 changed files with 11 additions and 5 deletions

View File

@ -395,6 +395,6 @@ fn converge(
}
fn read_leader(path: String) -> ReplicatedData {
let file = File::open(path).expect("file");
serde_json::from_reader(file).expect("parse")
let file = File::open(path.clone()).expect(&format!("file not found: {}", path));
serde_json::from_reader(file).expect(&format!("failed to parse {}", path))
}