Commit 71ea03c5 authored by Alex Beregszaszi's avatar Alex Beregszaszi

In VM mode, exception = 0 means that an exception happened (weirdly enough)

Finally, browser-solidity won't assume that an out-of-gas transaction was successful.
parent d5b9ea91
...@@ -486,7 +486,7 @@ UniversalDApp.prototype.getCallButton = function (args) { ...@@ -486,7 +486,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
if (err) { if (err) {
replaceOutput($result, $('<span/>').text(err).addClass('error')); replaceOutput($result, $('<span/>').text(err).addClass('error'));
// VM only // VM only
} else if (self.options.vm && result.vm.exception && result.vm.exceptionError) { } else if (self.options.vm && result.vm.exception === 0 && result.vm.exceptionError) {
replaceOutput($result, $('<span/>').text('VM Exception: ' + result.vm.exceptionError).addClass('error')); replaceOutput($result, $('<span/>').text('VM Exception: ' + result.vm.exceptionError).addClass('error'));
// VM only // VM only
} else if (self.options.vm && result.vm.return === undefined) { } else if (self.options.vm && result.vm.return === undefined) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment