Scheduler.Catch(IScheduler, Func) method¶
Defined in
Type: Scheduler
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static IScheduler Catch<TException>(this IScheduler scheduler, Func<TException, bool> handler) where TException : Exception
Summary: Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions.
Type parameters
| Name | Description |
|---|---|
TException | Type of the exception to check for. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to apply an exception filter for. |
handler | Func | Handler that's run if an exception is caught. The exception will be rethrown if the handler returns false. |
Returns: IScheduler -- Wrapper around the original scheduler, enforcing exception handling.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or handler is null. |