Closed boy-good closed 5 years ago
same here, maybe a missing authority of ${account}
error?
@spartucus i found the error maked by contract eosio_assert. the eosx.io can see the error. I want to know how to catch it in contract , like in "apply" function?
You need to implement the "onerror" action
@taokayan @hama only support to print error? Can operate table in "apply_onerror" function like "deferred_test.cpp"?
Also interesting how get which assert in deferred transaction trigger onerror situation.
@boy-good There are no restrictions on what can be done in apply_onerror()
. See
https://github.com/EOSIO/eos/blob/ea08cfd3d1a82b634a9e84f971d99708af516c0d/contracts/proxy/proxy.cpp#L71
for another example. Note that injudicious code could result in permanent loops, so care must be taken.
@vtsurka The above reference shows an example of retrieving the sent transaction in apply_onerror()
.
defer action maybe onerror how to catch in contract?