{
this,
[](auto self, auto err_bytes) {
auto&
raise = decltype(
this)(
self)->
raise_;
static string const delim = ": ";
static auto const delim_len = delim.size();
std::string_view err_str((char*)err_bytes.Data, err_bytes.Len);
auto delim_pos = err_str.find(delim);
string type(err_str.substr(0, delim_pos));
string msg(err_str.substr(delim_pos + delim_len));
if (type == "github.com/Taraxa-project/taraxa-evm/taraxa/state/state_db/ErrFutureBlock") {
raise = [err = ErrFutureBlock(std::move(type), msg)] { BOOST_THROW_EXCEPTION(err); };
return;
}
string traceback;
taraxa_evm_traceback(decoder_cb_c<string, to_str>(traceback));
msg += "\nGo stack trace:\n" + traceback;
raise = [err = TaraxaEVMError(std::move(type), msg)] { BOOST_THROW_EXCEPTION(err); };
},
}
std::function< void()> raise_
Definition: state_api.cpp:42