Skip to content

Commit

Permalink
Merge pull request #189 from ewasm/evmc-failure
Browse files Browse the repository at this point in the history
Return EVM_FAILURE and not EVM_INTERNAL_ERROR for contract issues
  • Loading branch information
axic authored Apr 19, 2018
2 parents 753c85c + b6634e9 commit 7699c93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ evm_result evm_execute(
cerr << e.what() << endl;
#endif
} catch (InternalErrorException const& e) {
ret.status_code = EVM_INTERNAL_ERROR;
// TODO: split exceptions properly, but for now this mostly (>90%) covers
// issues in the contracts, as opposed to unrecoverable issues in Hera
ret.status_code = EVM_FAILURE;
#if HERA_DEBUGGING
cerr << "InternalError: " << e.what() << endl;
#endif
Expand Down

0 comments on commit 7699c93

Please sign in to comment.