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

◆ error()

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

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

Definition at line 167 of file promise.h.

167 {
168 if (!valid()) {
169 static const Error default_error;
170 return default_error;
171 }
172 return mImpl->error();
173 }
fl::shared_ptr< detail::PromiseImpl< T > > mImpl
Shared pointer to implementation - this allows copying and sharing Promise state.
Definition promise.h:209
bool valid() const FL_NOEXCEPT
Check if Promise is valid.
Definition promise.h:108
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
Definition promise.h:58

References FL_NOEXCEPT, mImpl, and valid().

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

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