-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.2] Modify trace_api_plugin to report serialization errors to user #1449
Conversation
…ime to deserialize
BOOST_CHECK_EXCEPTION(handler.serialize_to_variant(action_trace_t, [&](){ ++depth; if (depth > 1) throw std::runtime_error("oops"); }), std::runtime_error, | ||
[](const std::runtime_error& e) { | ||
return std::string(e.what()).find("oops") != std::string::npos; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably you should either check except_called == true
here, or remove the variable alltogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS: cool test. Did you make up the abi out of thin air?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I meant to add a check for that. Added.
It was copied from another test. Originally hand-crafted.
cmd=" --print-response %s %d" % (cmdDesc, blockNum) | ||
cmd="%s %s %s" % (Utils.EosClientPath, node.eosClientArgs(), cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do it in 2 steps, and not:
cmd="%s %s --print-response %s %d" % (Utils.EosClientPath, node.eosClientArgs(), cmdDesc, blockNum)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason except that it was copied from another location that builds it up similar.
The exception handler for the
trace_api_plugin
data handler now rethrows any exceptions so they can be reported to the API caller of/v1/trace_api/get_block
and/v1/trace_api/get_transaction_trace
.trace_api_plugin
will now reportInstead of:
Resolves #1433