,System.IObservable{--0})} [])} })} ,System.Linq.Expressions.Expression{System.Func{--1,System.IObservable{--0}}})}
Qbservable.Catch(IQbservable, IObservable) method¶
Defined in
Type: Qbservable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IQbservable<TSource> Catch<TSource>(this IQbservable<TSource> first, IObservable<TSource> second) - 2.
public static IQbservable<TSource> Catch<TSource>(this IQbservableProvider provider, params IObservable<TSource>[] sources) - 3.
public static IQbservable<TSource> Catch<TSource>(this IQbservableProvider provider, IEnumerable<IObservable<TSource>> sources) - 4.
public static IQbservable<TSource> Catch<TSource, TException>(this IQbservable<TSource> source, Expression<Func<TException, IObservable<TSource>>> handler) where TException : Exception
1. Overload¶
public static IQbservable<TSource> Catch<TSource>(this IQbservable<TSource> first, IObservable<TSource> second)
Summary: Continues an observable sequence that is terminated by an exception with the next observable sequence.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence and handler sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
first | [IQbservable | First observable sequence whose exception (if any) is caught. |
second | IObservable | Second observable sequence used to produce results when an error occurred in the first sequence. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | first or second is null. |
2. Overload¶
public static IQbservable<TSource> Catch<TSource>(this IQbservableProvider provider, params IObservable<TSource>[] sources)
Summary: Continues an observable sequence that is terminated by an exception with the next observable sequence.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source and handler sequences. |
Parameters
| Name | Type | Description |
|---|---|---|
provider | [IQbservableProvider](# | Query provider used to construct the [IQbservable](# data source. |
params sources | IObservable<TSource>[] | Observable sequences to catch exceptions for. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | sources is null. |
3. Overload¶
public static IQbservable<TSource> Catch<TSource>(this IQbservableProvider provider, IEnumerable<IObservable<TSource>> sources)
Summary: Continues an observable sequence that is terminated by an exception with the next observable sequence.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source and handler sequences. |
Parameters
| Name | Type | Description |
|---|---|---|
provider | [IQbservableProvider](# | Query provider used to construct the [IQbservable](# data source. |
sources | IEnumerable | Observable sequences to catch exceptions for. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | sources is null. |
4. Overload¶
public static IQbservable<TSource> Catch<TSource, TException>(this IQbservable<TSource> source, Expression<Func<TException, IObservable<TSource>>> handler) where TException : Exception
Summary: Continues an observable sequence that is terminated by an exception of the specified type with the observable sequence produced by the handler.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements in the source sequence and sequences returned by the exception handler function. |
TException | The type of the exception to catch and handle. Needs to derive from Exception. |
Parameters
| Name | Type | Description |
|---|---|---|
source | [IQbservable | Source sequence. |
handler | Expression | Exception handler function, producing another observable sequence. |
Returns: IQbservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source or handler is null. |