diff --git a/ethers-contract/ethers-contract-abigen/src/source.rs b/ethers-contract/ethers-contract-abigen/src/source.rs index 960a189c..0728a4dc 100644 --- a/ethers-contract/ethers-contract-abigen/src/source.rs +++ b/ethers-contract/ethers-contract-abigen/src/source.rs @@ -171,7 +171,10 @@ fn get_local_contract(path: &Path) -> Result { 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) }