std::future_error (3) - Linux Manuals
std::future_error: std::future_error
NAME
std::future_error - std::future_error
Synopsis
Defined in header <future>
class future_error; (since C++11)
The class std::future_error defines an exception object that is thrown on failure by the functions in the thread library that deal with asynchronous execution and shared states (std::future, std::promise, etc). Similar to std::system_error, this exception carries an error code compatible with std::error_code.
std-future error-inheritance.svg
Inheritance diagram
Member functions
constructor (public member function)
code (public member function)
what (public member function)
Inherited from std::logic_error
Inherited from std::exception
Member functions
destructor destroys the exception object
[virtual]
what returns an explanatory string
[virtual]
Example
// Run this code
Possible output:
See also
future_errc identifies the future error codes
(C++11)