mirror of https://github.com/embarklabs/embark.git
better display error contract deployment errors in the dashbord
This commit is contained in:
parent
c2c2635acd
commit
1cb6581fde
|
@ -223,7 +223,7 @@ class ContractsManager {
|
||||||
} else if (contract.error) {
|
} else if (contract.error) {
|
||||||
contractData = [
|
contractData = [
|
||||||
className.green,
|
className.green,
|
||||||
(contract.error).red,
|
(contract.error).split("\n")[0].replace(/Error: /g, '').substring(0, 32).red,
|
||||||
'\t\tError'.red
|
'\t\tError'.red
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -127,7 +127,6 @@ class Deploy {
|
||||||
self.logger.info("deploying " + contract.className.bold.cyan + " with ".green + contract.gas + " gas".green);
|
self.logger.info("deploying " + contract.className.bold.cyan + " with ".green + contract.gas + " gas".green);
|
||||||
|
|
||||||
contractParams.push(function (err, transaction) {
|
contractParams.push(function (err, transaction) {
|
||||||
self.logger.contractsState(self.contractsManager.contractsState());
|
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
self.logger.error("error deploying contract: " + contract.className.cyan);
|
self.logger.error("error deploying contract: " + contract.className.cyan);
|
||||||
|
@ -137,14 +136,17 @@ class Deploy {
|
||||||
}
|
}
|
||||||
self.logger.error(errMsg);
|
self.logger.error(errMsg);
|
||||||
contract.error = errMsg;
|
contract.error = errMsg;
|
||||||
|
self.logger.contractsState(self.contractsManager.contractsState());
|
||||||
return callback(new Error(err));
|
return callback(new Error(err));
|
||||||
} else if (transaction.address !== undefined) {
|
} else if (transaction.address !== undefined) {
|
||||||
self.logger.info(contract.className.bold.cyan + " deployed at ".green + transaction.address.bold.cyan);
|
self.logger.info(contract.className.bold.cyan + " deployed at ".green + transaction.address.bold.cyan);
|
||||||
contract.deployedAddress = transaction.address;
|
contract.deployedAddress = transaction.address;
|
||||||
contract.transactionHash = transaction.transactionHash;
|
contract.transactionHash = transaction.transactionHash;
|
||||||
|
self.logger.contractsState(self.contractsManager.contractsState());
|
||||||
return callback(null, transaction.address);
|
return callback(null, transaction.address);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
self.logger.contractsState(self.contractsManager.contractsState());
|
||||||
|
|
||||||
contractObject["new"].apply(contractObject, contractParams);
|
contractObject["new"].apply(contractObject, contractParams);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "embark",
|
"name": "embark",
|
||||||
"version": "2.6.1",
|
"version": "2.7.0",
|
||||||
"description": "Embark is a framework that allows you to easily develop and deploy DApps",
|
"description": "Embark is a framework that allows you to easily develop and deploy DApps",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "./node_modules/.bin/eslint lib/",
|
"lint": "./node_modules/.bin/eslint lib/",
|
||||||
|
|
Loading…
Reference in New Issue