Class ExceptionHandler<TException, TResult>
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Provides a generic way to handle an Exception.
public class ExceptionHandler<TException, TResult>
where TException : Exception
Type Parameters
TException
The type of the Exception.
TResult
The type of the out result value of a TesterFunc<TResult, TSuccess>.
- Inheritance
-
ExceptionHandler<TException, TResult>
Methods
Create(Func<TResult, TException>)
Specifies the function delegate that determines the Exception to be thrown.
public ExceptionInvoker<TException, TResult> Create(Func<TResult, TException> handler)
Parameters
Returns
- ExceptionInvoker<TException, TResult>
An ExceptionInvoker<TException> with the specified
handler
.
Exceptions
- ArgumentNullException
handler
cannot be null.