FastLED 3.9.15
Loading...
Searching...
No Matches

◆ error()

template<typename T>
const Error & fl::promise< T >::error ( ) const
inline

Get the error (only valid if is_rejected() returns true)

Definition at line 181 of file promise.h.

181 {
182 if (!valid()) {
183 static const Error default_error;
184 return default_error;
185 }
186 return mImpl->error();
187 }
bool valid() const
Check if promise is valid.
Definition promise.h:122
fl::shared_ptr< detail::PromiseImpl< T > > mImpl
Shared pointer to implementation - this allows copying and sharing promise state.
Definition promise.h:223
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
Definition promise.h:72

References mImpl, and valid().

Referenced by fl::await_top_level(), complete_with_error(), and reject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: