Title
`task::promise_type::uncaught_exception` seems to be misnamed
Status
voting
Section
[task.promise]
Submitter
Jiang An

Created on 2025-10-17.00:00:00 last changed 12 hours ago

Messages

Date: 2025-10-23.10:32:45

Proposed resolution:

This wording is relative to N5014.

  1. Modify [task.promise] as indicated:

    namespace std::execution {
      template<class T, class Environment>
      class task<T, Environment>::promise_type {
      public:
        […]
        void uncaughtunhandled_exception();
        coroutine_handle<> unhandled_stopped();    
        […]
      };
    }
    
    […]
    void uncaughtunhandled_exception();
    

    -12- Effects: If the signature `set_error_t(exception_ptr)` is not an element of `error_types`, calls `terminate()` ([except.terminate]). Otherwise, stores `current_exception()` into errors.

Date: 2025-10-15.00:00:00

[ 2025-10-23; Reflector poll. ]

Set status to Tentatively Ready after five votes in favour during reflector poll.

Date: 2025-10-17.00:00:00

According to [dcl.fct.def.coroutine], a function of name `unhandled_exception` may be called by the language mechanisms. However, std::execution::task<T, Environment>::promise_type has an `uncaught_exception function` instead, which won't be implicitly called.

In P3552R3, `unhandled_exception` was discussed, but the wording specified `uncaught_exception`, which looks like a mistake. Moreover, the paper didn't talk about the status of `uncaught_exception` in the zombie name list ([tab:zombie.names.std]). Perhaps `unhandled_exception` is the correct function name.

History
Date User Action Args
2025-10-30 17:45:31adminsetstatus: ready -> voting
2025-10-23 10:32:45adminsetmessages: + msg15375
2025-10-23 10:32:45adminsetstatus: new -> ready
2025-10-18 17:12:33adminsetmessages: + msg15252
2025-10-17 00:00:00admincreate