Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Latest commit

 

History

History
57 lines (44 loc) · 2.12 KB

onerrorresumenextproto.md

File metadata and controls

57 lines (44 loc) · 2.12 KB

Rx.Observable.prototype.onErrorResumeNext(second)

Continues an observable sequence that is terminated normally or by an exception with the next observable sequence or Promise.

Arguments

  1. second (Observable | Promise): Second observable sequence used to produce results after the first sequence terminates.

Returns

(Observable): An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally.

Example

var source = Rx.Observable.throw(new Error())
    .onErrorResumeNext(Rx.Observable.return(42));

var subscription = source.subscribe(
    function (x) {
        console.log('Next: ' + x);
    },
    function (err) {
        console.log('Error: ' + err);
    },
    function () {
        console.log('Completed');
    });

// => Next: 42
// => Completed

Location

File:

Dist:

Prerequisites:

  • None

NPM Packages:

NuGet Packages:

Unit Tests: