aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-cov/src')
-rw-r--r--packages/sol-cov/src/collect_contract_data.ts3
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,