Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 2.04 KB

onerrorresumenextproto.md

File metadata and controls

56 lines (43 loc) · 2.04 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: