Fail smarter with better error handling #47

Merged
bumi merged 2 commits from features/initialize-error-handling into master 2018-04-15 18:14:13 +00:00
Showing only changes of commit 7e6c6a037d - Show all commits
+1 -1
View File
1
@@ -92,7 +92,7 @@ export default class Kredits {
let contractName = capitalize(name);
let address = this.addresses[contractName];
if (!address || !abis[contractName]) {
throw new Error('Address or ABI not found for ' + contractName);
throw new Error(`Address or ABI not found for ${contractName}`);
}
let contract = new ethers.Contract(address, abis[contractName], this.signer);
this.contracts[name] = new contracts[contractName](contract);