libcoro  1.0
Coroutine support library for C++20
exceptions.h
1 #pragma once
2 #include <exception>
3 
4 namespace coro {
5 
7 
10 class await_canceled_exception: public std::exception {
11 public:
12  const char *what() const noexcept override {return "co_await canceled";}
13 };
14 
16 
19 class still_pending_exception: public std::exception {
20 public:
21  const char *what() const noexcept override {return "Operation is still pending";}
22 };
23 
24 
25 
26 }
27 
28 
Exception is thrown on attempt to retrieve value after promise has been broken.
Definition: exceptions.h:10
Exception is thrown on attempt to retrieve promise when the future is already pending.
Definition: exceptions.h:19
main namespace
Definition: aggregator.h:8