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

◆ reject()

template<typename T>
bool fl::detail::PromiseImpl< T >::reject ( const Error & error)
inline

Reject promise with error.

Definition at line 319 of file promise.h.

319 {
320 if (mState != PromiseState_t::PENDING) return false;
321
322 mError = error;
324
325 // Process callback immediately if we have one
328 }
329
330 return true;
331 }
void process_callbacks()
Process pending callbacks.
Definition promise.h:369
PromiseState_t mState
Definition promise.h:359
const Error & error() const
Get error (only valid if rejected)
Definition promise.h:354
fl::function< void(const Error &)> mCatchCallback
Definition promise.h:364
Implementation class for promise - holds the actual state and logic.
Definition promise.h:259

References error(), mCallbacksProcessed, mCatchCallback, mError, mState, fl::detail::PENDING, process_callbacks(), and fl::detail::REJECTED.

+ Here is the call graph for this function: