diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/sol-cov/src/collect_contract_data.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/sol-cov/src/collect_contract_data.ts b/packages/sol-cov/src/collect_contract_data.ts index d97a7937f..a0ce2640f 100644 --- a/packages/sol-cov/src/collect_contract_data.ts +++ b/packages/sol-cov/src/collect_contract_data.ts @@ -25,6 +25,9 @@ export const collectContractsData = (artifactsPath: string, sourcesPath: string, const includedSourceCode = fs.readFileSync(source).toString(); return includedSourceCode; }); + if (_.isUndefined(artifact.networks[networkId])) { + throw new Error(`No ${baseName} artifacts found for networkId ${networkId}`); + } const contractData = { baseName, sourceCodes, |