16 #ifndef BLOOMBERG_QUANTUM_FUTURE_STATE_H 17 #define BLOOMBERG_QUANTUM_FUTURE_STATE_H 57 const char*
what() const noexcept
override 59 static std::map<FutureState, const char*> msg{
141 default:
throw std::logic_error(
"Invalid future state");
147 #endif //BLOOMBERG_QUANTUM_FUTURE_STATE_H PromiseNotSatisfiedException()
Definition: quantum_future_state.h:82
Definition: quantum_buffer_impl.h:22
Definition: quantum_future_state.h:80
BrokenPromiseException()
Definition: quantum_future_state.h:96
Definition: quantum_future_state.h:115
Definition: quantum_future_state.h:108
BufferingDataException()
Definition: quantum_future_state.h:117
Definition: quantum_future_state.h:94
Exception thrown by a Future or Promise object during various errors.
Definition: quantum_future_state.h:47
FutureAlreadyRetrievedException()
Definition: quantum_future_state.h:103
Promise could not be fulfilled.
Buffered future is being streamed.
Definition: quantum_future_state.h:122
const char * what() const noexcept override
Get the encapsulated error message from the exception object.
Definition: quantum_future_state.h:57
Future value has not yet been set.
Definition: quantum_future_state.h:101
Future value has been consumed. In the case of a buffer, no pulling is allowed.
void ThrowFutureException(FutureState state)
Definition: quantum_future_state.h:130
FutureState
Represents the internal state of a future/promise pair. Modeled after std::future_errc.
Definition: quantum_future_state.h:31
Definition: quantum_future_state.h:87
FutureException(FutureState error)
Constructor.
Definition: quantum_future_state.h:51
Buffer is closed for pushing data. Data can still be pulled.
NoStateException()
Definition: quantum_future_state.h:110
Shared state between Promise and Future is invalid.
PromiseAlreadySatisfiedException()
Definition: quantum_future_state.h:89
Future value has been set but not yet consumed.
BufferClosedException()
Definition: quantum_future_state.h:124