Class Result.Catcher<TValue>
Inheritance
Result.Catcher<TValue>
Assembly: Recore.dll
Syntax
public sealed class Catcher<TValue>
Type Parameters
Methods
|
Improve this Doc
View Source
Catch<TException>()
Executes the stored function and catches exceptions of the given type.
Declaration
public Result<TValue, TException> Catch<TException>()
where TException : Exception
Returns
Type |
Description |
Result<TValue, TException> |
|
Type Parameters
Name |
Description |
TException |
|
|
Improve this Doc
View Source
Catch<TException, TMapped>(Func<TException, TMapped>)
Executes the stored function and catches exceptions of the given type matching the given predicate.
Declaration
public Result<TValue, TMapped> Catch<TException, TMapped>(Func<TException, TMapped> onException)
where TException : Exception
Parameters
Type |
Name |
Description |
Func<TException, TMapped> |
onException |
|
Returns
Type |
Description |
Result<TValue, TMapped> |
|
Type Parameters
Name |
Description |
TException |
|
TMapped |
|
Extension Methods