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