Notifies the observer that an exception has occurred.
error
(Any): The error that has occurred.
{% if book.isPdf %}
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!!
{% else %}
{% endif %}
{% if book.isPdf %}
{% else %}
- rx.js
{% endif %}