|
|
@ -1,5 +1,4 @@ |
|
|
|
'use strict' |
|
|
|
'use strict' |
|
|
|
var yo = require('yo-yo') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
/** |
|
|
|
/** |
|
|
@ -46,17 +45,16 @@ module.exports = { |
|
|
|
if (!txResult.result.vm.exceptionError) { |
|
|
|
if (!txResult.result.vm.exceptionError) { |
|
|
|
return ret |
|
|
|
return ret |
|
|
|
} |
|
|
|
} |
|
|
|
var error = yo`<span> VM error: ${txResult.result.vm.exceptionError}</span>` |
|
|
|
var error = `VM error: ${txResult.result.vm.exceptionError}.\n` |
|
|
|
var msg |
|
|
|
var msg |
|
|
|
if (txResult.result.vm.exceptionError === 'invalid opcode') { |
|
|
|
if (txResult.result.vm.exceptionError === 'invalid opcode') { |
|
|
|
msg = yo`<ul><li>The constructor should be payable if you send it value.</li>
|
|
|
|
msg = `\tThe constructor should be payable if you send value.\n\tThe execution might have thrown.\n` |
|
|
|
<li>The execution might have thrown.</li></ul>` |
|
|
|
|
|
|
|
ret.error = true |
|
|
|
ret.error = true |
|
|
|
} else if (txResult.result.vm.exceptionError === 'out of gas') { |
|
|
|
} else if (txResult.result.vm.exceptionError === 'out of gas') { |
|
|
|
msg = yo`<div>The transaction ran out of gas. Please increase the Gas Limit.</div>` |
|
|
|
msg = `\tThe transaction ran out of gas. Please increase the Gas Limit.\n` |
|
|
|
ret.error = true |
|
|
|
ret.error = true |
|
|
|
} |
|
|
|
} |
|
|
|
ret.message = yo`<div>${error} ${msg} Debug the transaction to get more information</div>` |
|
|
|
ret.message = `${error}${msg}\tDebug the transaction to get more information.` |
|
|
|
return ret |
|
|
|
return ret |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|