Class CatchClause

Assembly: redb.Route.dll

A catch clause used by .
Matches exceptions by type and executes a handler processor.

public class CatchClause

Inheritance

Object→CatchClause

Properties

ExceptionType

The exception type to catch.

public Type ExceptionType { get; }

Handler

Processor to execute when the exception is caught.

public IProcessor Handler { get; }

When

Optional predicate for additional filtering.

public Func<Exception, bool>? When { get; }

Methods

For<TException>(IProcessor, Func<TException, bool>?)

Creates a typed catch clause.

public static CatchClause For<TException>(IProcessor handler, Func<TException, bool>? when = null) where TException : Exception

Matches(Exception)

Checks whether this clause matches the given exception.

public bool Matches(Exception exception)

Constructors