Register error callback - returns reference for chaining.
- Parameters
-
callback | Function to call when promise rejects with error |
- Returns
- Reference to this promise for chaining
Definition at line 139 of file promise.h.
139 {
140 if (!
valid())
return *
this;
141
143 return *this;
144 }
bool valid() const
Check if promise is valid.
fl::shared_ptr< detail::PromiseImpl< T > > mImpl
Shared pointer to implementation - this allows copying and sharing promise state.
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
References promise(), mImpl, fl::move(), and valid().