std::
generator<Ref,V,Allocator>::promise_type::
unhandled_exception
<
cpp
|
coroutine
|
generator
|
promise type
void
unhandled_exception
(
)
;
(C++23 起)
令
x
为某个
generator
。
如果
x
的
*
active_
顶端是一个代表以
*
this
为
承诺对象
的
句柄
:
如果
x.
*
active_
的唯一元素就是代表以
*
this
为承诺对象的协程的句柄,则等价于
throw
。
否则,赋值
std::current_exception()
给
except_
。
否则,其行为未定义。
参数
(无)
返回值
(无)
异常
可能抛出。