Title
Unclear semantics of exception escaping from unhandled_exception
Status
open
Section
9.5.4 [dcl.fct.def.coroutine]
Submitter
Brian Bi

Created on 2024-07-13.00:00:00 last changed 1 week ago

Messages

Date: 2024-11-09.00:21:39

CWG 2024-11-08

The implementations are correct; the normative wording needs to be amended.

Date: 2024-07-13.00:00:00

(From submission #574. See also coroutines-ts#17 and coroutines-ts#30.)

Subclause 9.5.4 [dcl.fct.def.coroutine] paragraph 14 specifies:

If the evaluation of the expression promise.unhandled_exception() exits via an exception, the coroutine is considered suspended at the final suspend point and the exception propagates to the caller or resumer.

However, implementations destroy the promise object, the parameter copies, and the coroutine state before propagating the exception, which is consistent with the as-if code presented in 9.5.4 [dcl.fct.def.coroutine] paragraph 5.

History
Date User Action Args
2024-11-09 00:21:39adminsetmessages: + msg7886
2024-07-13 00:00:00admincreate