stringify error

pull/1/head
yann300 7 years ago
parent 32d46d5ffd
commit 9ae63da3ef
  1. 11
      src/universal-dapp.js

@ -438,6 +438,17 @@ UniversalDApp.prototype.runTx = function (args, cb) {
if (!args.useCall) {
self.event.trigger('transactionExecuted', [error, args.to, args.data, false, result])
}
if (error) {
if (typeof (error) !== 'string') {
if (error.message) {
error = error.message
} else {
try {
error = 'error: ' + JSON.stringify(error)
} catch (e) {}
}
}
}
callback(error, result)
})
}

Loading…
Cancel
Save