onError
Notifies the observer that an exception has occurred.
Arguments
error
(Any): The error that has occurred.
var observer = Rx.Observer.create(
x => console.log(`onNext: ${x}`),
e => console.log(`onError: ${e}`),
() => console.log('onCompleted'));
observer.onError(new Error('error!!'));
// => onError: Error: error!!
Example
Last updated
Was this helpful?