This is RxJS v 4. Find the latest version here
Subscribes a function to invoke upon exceptional termination of the observable sequence.
onError
(Function
): Function to invoke upon exceptional termination of the observable sequence.[thisArg]
(Any
): Object to use as this when executing callback.
(Disposable): The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.
/* Using functions */
var source = Rx.Observable.throw(new Error());
var subscription = source.subscribeOnError(
function (err) {
console.log('Error: %s', err);
});
// => Error: Error
/* With a thisArg */
var source = Rx.Observable.throw(new Error());
var subscription = source.subscribeOnError(
function (err) {
this.log('Error: %s', err);
}, console);
// => Error: Error
File:
Dist:
NPM Packages:
NuGet Packages:
Unit Tests: