Catch(TSource) Method (IObservable(TSource), IObservable(TSource))

Observable.Catch(Of TSource) Method (IObservable(Of TSource), IObservable(Of TSource))

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

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

<ExtensionAttribute> _
Public Shared Function Catch(Of TSource) ( _
	first As IObservable(Of TSource), _
	second As IObservable(Of TSource) _
) As IObservable(Of TSource)
Dim first As IObservable(Of TSource)
Dim second As IObservable(Of TSource)
Dim returnValue As IObservable(Of TSource)

returnValue = first.Catch(second)

Type Parameters


The type of source.


Type: System.IObservable(Of TSource)
First observable sequence whose exception (if any) is caught.
Type: System.IObservable(Of TSource)
The second observable sequence used to produce results when an error occurred in the first sequence.

Return Value

Type: System.IObservable(Of TSource)
An observable sequence containing the first sequence's elements, followed by the elements of the second sequence in case an exception occurred.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IObservable(Of TSource). When you use instance method syntax to call this method, omit the first parameter. For more information, see or
© 2015 Microsoft