mirror of https://github.com/embarklabs/embark.git
refactor(@embark/deployment): remove try/catch block
This code didn't really make sense in the first place as we use `async.auto()` at the moment for callback based error handling.
This commit is contained in:
parent
8997476e33
commit
317449e840
|
@ -81,25 +81,20 @@ class DeployManager {
|
||||||
contractDeploys[className].push(deploy);
|
contractDeploys[className].push(deploy);
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
async.auto(contractDeploys, 1, function(_err, _results) {
|
||||||
async.auto(contractDeploys, 1, function(_err, _results) {
|
if (errors.length) {
|
||||||
if (errors.length) {
|
_err = __("Error deploying contracts. Please fix errors to continue.");
|
||||||
_err = __("Error deploying contracts. Please fix errors to continue.");
|
self.logger.error(_err);
|
||||||
self.logger.error(_err);
|
self.events.emit("outputError", __("Error deploying contracts, please check console"));
|
||||||
self.events.emit("outputError", __("Error deploying contracts, please check console"));
|
return done(_err);
|
||||||
return done(_err);
|
}
|
||||||
}
|
if (contracts.length === 0) {
|
||||||
if (contracts.length === 0) {
|
self.logger.info(__("no contracts found"));
|
||||||
self.logger.info(__("no contracts found"));
|
return done();
|
||||||
return done();
|
}
|
||||||
}
|
self.logger.info(__("finished deploying contracts"));
|
||||||
self.logger.info(__("finished deploying contracts"));
|
done(err);
|
||||||
done(err);
|
});
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
self.logger.error(e.message || e);
|
|
||||||
done(__('Error deploying'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue