aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-03-09 23:01:31 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-03-12 10:37:29 +0800
commitf590aa11f79d3dfb8585b0b42103db74dcb6ee13 (patch)
tree06979c13079ca485c855c296ac971bbda8c205d6
parent6b7f48644c79c59a7137cd84f9e753910e506df9 (diff)
downloaddexon-0x-contracts-f590aa11f79d3dfb8585b0b42103db74dcb6ee13.tar.gz
dexon-0x-contracts-f590aa11f79d3dfb8585b0b42103db74dcb6ee13.tar.zst
dexon-0x-contracts-f590aa11f79d3dfb8585b0b42103db74dcb6ee13.zip
Throw an error if artifacts not found
-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,