mirror of https://github.com/status-im/evmc.git
EVM-C: update capi.c to reflect the new error handling
This commit is contained in:
parent
971033adda
commit
6d2b6efa90
|
@ -80,9 +80,9 @@ int main(int argc, char *argv[]) {
|
||||||
sizeof(input), value);
|
sizeof(input), value);
|
||||||
|
|
||||||
printf("Execution result:\n");
|
printf("Execution result:\n");
|
||||||
if (result.outcome == EVM_EXCEPTION) {
|
if (result.outcome != EVM_SUCCESS) {
|
||||||
printf(" EVM exception\n");
|
printf(" EVM execution failure: %d\n", result.outcome);
|
||||||
}
|
} else {
|
||||||
printf(" Gas used: %ld\n", gas - result.gas_left);
|
printf(" Gas used: %ld\n", gas - result.gas_left);
|
||||||
printf(" Gas left: %ld\n", result.gas_left);
|
printf(" Gas left: %ld\n", result.gas_left);
|
||||||
printf(" Output size: %zd\n", result.output_size);
|
printf(" Output size: %zd\n", result.output_size);
|
||||||
|
@ -93,6 +93,7 @@ int main(int argc, char *argv[]) {
|
||||||
printf("%02x ", result.output_data[i]);
|
printf("%02x ", result.output_data[i]);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
intf.release_result(&result);
|
intf.release_result(&result);
|
||||||
intf.destroy(jit);
|
intf.destroy(jit);
|
||||||
|
|
Loading…
Reference in New Issue