onError
优质
小牛编辑
131浏览
2023-12-01
Updates the handle with a callback to execute if/when any error is encountered during asynchronous iteration.
Signature
AsyncHandle.onError = function(callback) { /*...*/ }
AsyncHandle.onError = function onError(callback) { this.rejectListeners.push(callback); return this; }
Name | Type(s) | Description |
---|---|---|
callback | Function | The function to call, with any associated error object, when an error occurs. |