Method AsyncResult():catch() Foundation
Chains an error handler to execute when the operation fails.
:catch( <bErrorBlock> ) --> oAsyncResult
A new AsyncResult object representing the result of the handler.
Registers a codeblock to execute when the operation completes with an error. This method implements the promise-like chaining pattern for error handling.
The error handler will receive the error object as its parameter. If the AsyncResult is already in the "error" state, the handler is executed immediately. If the AsyncResult is in the "finished" state, the handler is not executed at all.
This method returns a new AsyncResult object that represents the result of the handler. This allows for further chaining of success, error, and finalization handlers.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.