catch
Tells CancellablePromise what callback to call on failure of the inner promise.
Declaration
CancellablePromise catch(
Function? onrejected
);Parameters
- onrejected:
An optional function
CancellablePromisecalls when the inner promise rejects.
Discussion
If you provide a function for the onrejected parameter, CancellablePromise calls that function if the promise fails.