Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:51

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // Copyright (c) Lewis Baker
0003 // Licenced under MIT license. See LICENSE.txt for details.
0004 ///////////////////////////////////////////////////////////////////////////////
0005 #ifndef CPPCORO_BROKEN_PROMISE_HPP_INCLUDED
0006 #define CPPCORO_BROKEN_PROMISE_HPP_INCLUDED
0007 
0008 #include <stdexcept>
0009 
0010 namespace cppcoro
0011 {
0012     /// \brief
0013     /// Exception thrown when you attempt to retrieve the result of
0014     /// a task that has been detached from its promise/coroutine.
0015     class broken_promise : public std::logic_error
0016     {
0017     public:
0018         broken_promise()
0019             : std::logic_error("broken promise")
0020         {}
0021     };
0022 }
0023 
0024 #endif