mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-25 22:49:01 +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,
|
'Interface or set to not deploy'.green,
|
||||||
"\t\tn/a".green
|
"\t\tn/a".green
|
||||||
]
|
]
|
||||||
|
} else if (contract.error) {
|
||||||
|
contractData = [
|
||||||
|
className.green,
|
||||||
|
(contract.error).red,
|
||||||
|
'\t\tError'.red
|
||||||
|
]
|
||||||
} else {
|
} else {
|
||||||
contractData = [
|
contractData = [
|
||||||
className.green,
|
className.green,
|
||||||
|
@ -18,6 +18,8 @@ var Deploy = function(options) {
|
|||||||
Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
|
Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
contract.error = false;
|
||||||
|
|
||||||
if (contract.deploy === false) {
|
if (contract.deploy === false) {
|
||||||
self.logger.contractsState(self.contractsManager.contractsState());
|
self.logger.contractsState(self.contractsManager.contractsState());
|
||||||
return callback();
|
return callback();
|
||||||
@ -122,6 +124,7 @@ Deploy.prototype.deployContract = function(contract, params, callback) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
self.logger.error("error deploying contract: " + contract.className);
|
self.logger.error("error deploying contract: " + contract.className);
|
||||||
self.logger.error(err.toString());
|
self.logger.error(err.toString());
|
||||||
|
contract.error = err.toString();
|
||||||
callback(new Error(err));
|
callback(new Error(err));
|
||||||
} else if (transaction.address !== undefined) {
|
} else if (transaction.address !== undefined) {
|
||||||
self.logger.info(contract.className + " deployed at " + transaction.address);
|
self.logger.info(contract.className + " deployed at " + transaction.address);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user