move console log into UNHANDLED_ERROR clause

This commit is contained in:
Fabio Berger 2017-05-26 17:41:08 +02:00
parent 066c7ff0aa
commit 79249f5e8a

View File

@ -42,10 +42,10 @@ export class ContractWrapper {
return contractInstance;
} catch (err) {
const errMsg = `${err}`;
utils.consoleLog(`Notice: Error encountered: ${err} ${err.stack}`);
if (_.includes(errMsg, 'not been deployed to detected network')) {
throw new Error(ZeroExError.CONTRACT_DOES_NOT_EXIST);
} else {
utils.consoleLog(`Notice: Error encountered: ${err} ${err.stack}`);
throw new Error(ZeroExError.UNHANDLED_ERROR);
}
}