@@ -238,12 +238,13 @@ namespace exec::__system_context_default_impl {
238238
239239 public:
240240 void schedule (std::span<std::byte> __storage, receiver& __r) noexcept override {
241- try {
241+ STDEXEC_TRY {
242242 auto __sndr = stdexec::schedule (__pool_scheduler_);
243243 auto __os =
244244 __schedule_operation_t::__construct_maybe_alloc (__storage, &__r, std::move (__sndr));
245245 __os->start ();
246- } catch (std::exception& __e) {
246+ }
247+ STDEXEC_CATCH (std::exception & __e) {
247248 __r.set_error (std::current_exception ());
248249 }
249250 }
@@ -252,7 +253,7 @@ namespace exec::__system_context_default_impl {
252253 uint32_t __size,
253254 std::span<std::byte> __storage,
254255 bulk_item_receiver& __r) noexcept override {
255- try {
256+ STDEXEC_TRY {
256257 // Determine the chunking size based on the ratio between the given size and the number of workers in our pool.
257258 // Aim at having 2 chunks per worker.
258259 uint32_t __chunk_size = (__available_parallelism_ > 0
@@ -271,7 +272,8 @@ namespace exec::__system_context_default_impl {
271272 auto __os = __schedule_bulk_chunked_operation_t::__construct_maybe_alloc (
272273 __storage, &__r, std::move (__sndr));
273274 __os->start ();
274- } catch (std::exception& __e) {
275+ }
276+ STDEXEC_CATCH (std::exception & __e) {
275277 __r.set_error (std::current_exception ());
276278 }
277279 }
@@ -280,7 +282,7 @@ namespace exec::__system_context_default_impl {
280282 uint32_t __size,
281283 std::span<std::byte> __storage,
282284 bulk_item_receiver& __r) noexcept override {
283- try {
285+ STDEXEC_TRY {
284286 auto __sndr = stdexec::bulk (
285287 stdexec::schedule (__pool_scheduler_),
286288 stdexec::par,
@@ -289,7 +291,8 @@ namespace exec::__system_context_default_impl {
289291 auto __os = __schedule_bulk_unchunked_operation_t::__construct_maybe_alloc (
290292 __storage, &__r, std::move (__sndr));
291293 __os->start ();
292- } catch (std::exception& __e) {
294+ }
295+ STDEXEC_CATCH (std::exception & __e) {
293296 __r.set_error (std::current_exception ());
294297 }
295298 }
0 commit comments