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

◆ reject() [1/2]

template<typename T>
static Promise< T > fl::task::Promise< T >::reject ( const Error & error)
inlinestatic

Create a rejected Promise with error.

Definition at line 81 of file promise.h.

81 { // okay static in header
82 auto p = create();
84 return p;
85 }
const Error & error() const FL_NOEXCEPT
Get the error (only valid if is_rejected() returns true)
Definition promise.h:167
static Promise< T > create() FL_NOEXCEPT
Create a pending Promise.
Definition promise.h:61
bool complete_with_error(const Error &error) FL_NOEXCEPT
Complete the Promise with an error (used by networking library)
Definition promise.h:194
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
Definition promise.h:58

References Promise(), create(), error(), and FL_NOEXCEPT.

Referenced by fl::task::make_rejected_promise(), fl::task::make_rejected_promise(), and reject().

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