mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
display error in contract status
This commit is contained in:
parent
907a358e5b
commit
d05cf90b5b
@ -185,6 +185,12 @@ ContractsManager.prototype.contractsState = function() {
|
||||
'Interface or set to not deploy'.green,
|
||||
"\t\tn/a".green
|
||||
]
|
||||
} else if (contract.error) {
|
||||
contractData = [
|
||||
className.green,
|
||||
(contract.error).red,
|
||||
'\t\tError'.red
|
||||
]
|
||||
} else {
|
||||
contractData = [
|
||||
className.green,
|
||||
|
@ -18,6 +18,8 @@ var Deploy = function(options) {
|
||||
Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
|
||||
var self = this;
|
||||
|
||||
contract.error = false;
|
||||
|
||||
if (contract.deploy === false) {
|
||||
self.logger.contractsState(self.contractsManager.contractsState());
|
||||
return callback();
|
||||
@ -122,6 +124,7 @@ Deploy.prototype.deployContract = function(contract, params, callback) {
|
||||
if (err) {
|
||||
self.logger.error("error deploying contract: " + contract.className);
|
||||
self.logger.error(err.toString());
|
||||
contract.error = err.toString();
|
||||
callback(new Error(err));
|
||||
} else if (transaction.address !== undefined) {
|
||||
self.logger.info(contract.className + " deployed at " + transaction.address);
|
||||
|
Loading…
x
Reference in New Issue
Block a user