feature: report path on failed abigen load (#205)

This commit is contained in:
James Prestwich 2021-02-22 10:35:40 -08:00 committed by GitHub
parent 7b0af7e73e
commit 3e5f7a795f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -171,7 +171,10 @@ fn get_local_contract(path: &Path) -> Result<String> {
Cow::Borrowed(path)
};
let json = fs::read_to_string(path).context("failed to read artifact JSON file")?;
let json = fs::read_to_string(&path).context(format!(
"failed to read artifact JSON file with path {}",
&path.display()
))?;
Ok(json)
}