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

◆ complete_with_error() [1/2]

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

Complete the Promise with an error (used by networking library)

Definition at line 194 of file promise.h.

194 {
195 if (!valid()) return false;
196 return mImpl->reject(error);
197 }
fl::shared_ptr< detail::PromiseImpl< T > > mImpl
Shared pointer to implementation - this allows copying and sharing Promise state.
Definition promise.h:209
const Error & error() const FL_NOEXCEPT
Get the error (only valid if is_rejected() returns true)
Definition promise.h:167
bool valid() const FL_NOEXCEPT
Check if Promise is valid.
Definition promise.h:108

References error(), FL_NOEXCEPT, mImpl, and valid().

Referenced by fl::net::http::HttpStreamTransport::resolveRpc(), fl::net::http::HttpStreamTransport::resolveRpcStream(), and fl::net::http::HttpStreamTransport::rpc().

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