Class ThrowHelper<TException>
- Namespace
- Garyon.Exceptions
- Assembly
- Garyon.dll
A helper class providing tools for throwing exceptions. It should be preferred to use in code that demands optimization.
public static class ThrowHelper<TException> where TException : Exception, new()
Type Parameters
TExceptionThe type of the exception being thrown.
- Inheritance
-
ThrowHelper<TException>
- Inherited Members
Methods
Throw()
Throws an exception of the given TException type.
[DoesNotReturn]
public static void Throw()
ThrowReturn<TReturn>()
Throws an exception of the given TException type
and also comes with a return type. The value is never returned due to
the exception being thrown.
public static TReturn ThrowReturn<TReturn>()
Returns
- TReturn
Never returns; this is only made to enable target-typing.
Type Parameters
TReturnThe return type that will be targeted.