Qbservable.Catch(Of TSource, TException) Method (IQbservable(Of TSource), Expression(Of Func(Of TException, IObservable(Of TSource))))

Continues a queryable observable sequence that is terminated by an exception of the specified type with the queryable observable sequence produced by the handler.

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

<ExtensionAttribute> _
Public Shared Function Catch(Of TSource, TException) ( _
	source As IQbservable(Of TSource), _
	handler As Expression(Of Func(Of TException, IObservable(Of TSource))) _
) As IQbservable(Of TSource)
Dim source As IQbservable(Of TSource)
Dim handler As Expression(Of Func(Of TException, IObservable(Of TSource)))
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Catch(handler)

Type Parameters


The type of source.


The type of the exception.


Type: System.Reactive.Linq.IQbservable(Of TSource)
The source sequence.
Type: System.Linq.Expressions.Expression(Of Func(Of TException, IObservable(Of TSource)))
The exception handler function, producing another queryable observable sequence.

Return Value

Type: System.Reactive.Linq.IQbservable(Of TSource)
A queryable observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting queryable observable 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 IQbservable(Of TSource). When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103).aspx or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.