Creates an object that represents an OnError notification to an observer.
exception
(Any): The exception contained in the notification.
(Notification): The OnError notification containing the exception.
{% if book.isPdf %}
var source = Rx.Observable
.fromArray([
Rx.Notification.createOnError(new Error('woops'))
])
.dematerialize();
var subscription = source.subscribe(
x => console.log(`onNext: ${x}`),
e => console.log(`onError: ${e}`),
() => console.log('onCompleted'));
// => onError: Error: woops
{% else %}
{% endif %}
{% if book.isPdf %}
{% else %}
- rx.js
{% endif %}