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);
|
||||
});
|
||||
|
||||
try {
|
||||
async.auto(contractDeploys, 1, function(_err, _results) {
|
||||
if (errors.length) {
|
||||
_err = __("Error deploying contracts. Please fix errors to continue.");
|
||||
self.logger.error(_err);
|
||||
self.events.emit("outputError", __("Error deploying contracts, please check console"));
|
||||
return done(_err);
|
||||
}
|
||||
if (contracts.length === 0) {
|
||||
self.logger.info(__("no contracts found"));
|
||||
return done();
|
||||
}
|
||||
self.logger.info(__("finished deploying contracts"));
|
||||
done(err);
|
||||
});
|
||||
} catch (e) {
|
||||
self.logger.error(e.message || e);
|
||||
done(__('Error deploying'));
|
||||
}
|
||||
async.auto(contractDeploys, 1, function(_err, _results) {
|
||||
if (errors.length) {
|
||||
_err = __("Error deploying contracts. Please fix errors to continue.");
|
||||
self.logger.error(_err);
|
||||
self.events.emit("outputError", __("Error deploying contracts, please check console"));
|
||||
return done(_err);
|
||||
}
|
||||
if (contracts.length === 0) {
|
||||
self.logger.info(__("no contracts found"));
|
||||
return done();
|
||||
}
|
||||
self.logger.info(__("finished deploying contracts"));
|
||||
done(err);
|
||||
});
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue