本文整理汇总了C++中AsioSession::onResumableFail方法的典型用法代码示例。如果您正苦于以下问题:C++ AsioSession::onResumableFail方法的具体用法?C++ AsioSession::onResumableFail怎么用?C++ AsioSession::onResumableFail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AsioSession
的用法示例。
在下文中一共展示了AsioSession::onResumableFail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fail
void c_AsyncGeneratorWaitHandle::fail(ObjectData* exception) {
AsioSession* session = AsioSession::Get();
if (UNLIKELY(session->hasOnResumableFailCallback())) {
session->onResumableFail(this, exception);
}
auto parentChain = getParentChain();
setState(STATE_FAILED);
cellCopy(make_tv<KindOfObject>(exception), m_resultOrException);
parentChain.unblock();
decRefObj(m_generator);
decRefObj(this);
}
示例2: fail
/**
* Mark the wait handle as failed due to PHP exception.
*
* - consumes reference of the given Exception object
*/
void c_AsyncFunctionWaitHandle::fail(ObjectData* exception) {
assert(isRunning());
assert(exception);
assert(exception->instanceof(SystemLib::s_ExceptionClass));
AsioSession* session = AsioSession::Get();
if (UNLIKELY(session->hasOnResumableFailCallback())) {
session->onResumableFail(this, exception);
}
auto const parentChain = getFirstParent();
setState(STATE_FAILED);
cellCopy(make_tv<KindOfObject>(exception), m_resultOrException);
UnblockChain(parentChain);
decRefObj(this);
}
示例3: fail
/**
* Mark the wait handle as failed due to PHP exception.
*
* - consumes reference of the given Exception object
*/
void c_AsyncFunctionWaitHandle::fail(ObjectData* exception) {
assert(isRunning());
assert(exception);
assert(exception->instanceof(SystemLib::s_ThrowableClass));
AsioSession* session = AsioSession::Get();
if (UNLIKELY(session->hasOnResumableFail())) {
try {
session->onResumableFail(this, Object{exception});
} catch (...) {
// TODO(#4557954) Make unwinder able to deal with new exceptions better.
handle_destructor_exception("AsyncFunctionWaitHandle fail callback");
}
}
auto parentChain = getParentChain();
setState(STATE_FAILED);
cellCopy(make_tv<KindOfObject>(exception), m_resultOrException);
parentChain.unblock();
}