Skip to content

)}

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

NameDescription
TExceptionType of the exception to check for.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to apply an exception filter for.
handlerFuncHandler 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

TypeCondition
System.ArgumentNullExceptionscheduler or handler is null.