Class ExceptionRaiser
Provides raising of exceptions with building of conditions to throw them.
public class ExceptionRaiser
- Inheritance
-
ExceptionRaiser
- Inherited Members
Methods
AggregateException(bool, string, params Exception[])
public void AggregateException(bool when, string message = null, params Exception[] innerExceptions)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerExceptions
Exception[]The inner exceptions.
AmbiguousMatchException(bool, string, Exception)
Raises the AmbiguousMatchException(bool, string, Exception).
public void AmbiguousMatchException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
ArgumentException(bool, string, string, Exception)
public void ArgumentException(bool when, string message = null, string paramName = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.A condition to throw the exception.
message
stringThe message.
paramName
stringName of the parameter.
innerException
ExceptionThe inner exception.
ArgumentNullException(bool, string, Exception)
Raises the ArgumentNullException.
public void ArgumentNullException(bool when, string message, Exception innerException)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
ArgumentNullException(bool, string, string)
Raises the ArgumentNullException.
public void ArgumentNullException(bool when, string paramName = null, string message = null)
Parameters
when
boolA condition to throw the exception.
paramName
stringName of the parameter.
message
stringThe message.
ArgumentOutOfRangeException(bool, string, Exception)
Raises the ArgumentOutOfRangeException.
public void ArgumentOutOfRangeException(bool when, string message, Exception innerException)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
ArgumentOutOfRangeException(bool, string, object, string)
Raises the ArgumentOutOfRangeException.
public void ArgumentOutOfRangeException(bool when, string paramName = null, object actualValue = null, string message = null)
Parameters
when
boolA condition to throw the exception.
paramName
stringName of the parameter.
actualValue
objectThe value of the argument that causes this exception.
message
stringThe message.
AuthenticationException(bool, string, Exception)
Raises the AuthenticationException(bool, string, Exception).
public void AuthenticationException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
DirectoryNotFoundException(bool, string, Exception)
public void DirectoryNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
DllNotFoundException(bool, string, Exception)
Raises the DllNotFoundException(bool, string, Exception).
public void DllNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
DriveNotFoundException(bool, string, Exception)
Raises the DriveNotFoundException(bool, string, Exception).
public void DriveNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
Exception(bool, string, Exception)
Raises the Exception.
public void Exception(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
FileLoadException(bool, string, string, Exception)
public void FileLoadException(bool when, string message = null, string fileName = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
fileName
stringThe file name.
innerException
ExceptionThe inner exception.
FileNotFoundException(bool, string, string, Exception)
public void FileNotFoundException(bool when, string message = null, string fileName = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
fileName
stringThe file name.
innerException
ExceptionThe inner exception.
FormatException(bool, string, Exception)
Raises the FormatException(bool, string, Exception).
public void FormatException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
IndexOutOfRangeException(bool, string, Exception)
public void IndexOutOfRangeException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
InvalidCastException(bool, string, Exception)
Raises the InvalidCastException.
public void InvalidCastException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
InvalidCastException(bool, string, int)
Raises the InvalidCastException.
public void InvalidCastException(bool when, string message, int errorCode)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
errorCode
intThe error code (HRESULT).
InvalidCredentialException(bool, string, Exception)
public void InvalidCredentialException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
InvalidDataException(bool, string, Exception)
Raises the InvalidDataException(bool, string, Exception).
public void InvalidDataException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
InvalidOperationException(bool, string, Exception)
public void InvalidOperationException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
KeyNotFoundException(bool, string, Exception)
Raises the KeyNotFoundException(bool, string, Exception).
public void KeyNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
MissingFieldException(bool, string, Exception)
Raises the MissingFieldException.
public void MissingFieldException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
MissingFieldException(bool, string, string)
Raises the MissingFieldException.
public void MissingFieldException(bool when, string className = null, string fieldName = null)
Parameters
when
boolA condition to throw the exception.
className
stringThe class name.
fieldName
stringThe field name.
MissingMemberException(bool, string, Exception)
Raises the MissingMemberException.
public void MissingMemberException(bool when, string message, Exception innerException)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
MissingMemberException(bool, string, string)
Raises the MissingMemberException.
public void MissingMemberException(bool when, string className = null, string memberName = null)
Parameters
when
boolA condition to throw the exception.
className
stringThe class name.
memberName
stringThe member name.
MissingMethodException(bool, string, Exception)
Raises the MissingMethodException.
public void MissingMethodException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
MissingMethodException(bool, string, string)
Raises the MissingMethodException.
public void MissingMethodException(bool when, string className = null, string methodName = null)
Parameters
when
boolA condition to throw the exception.
className
stringThe class name.
methodName
stringThe method name.
NotImplementedException(bool, string, Exception)
Raises the NotImplementedException(bool, string, Exception).
public void NotImplementedException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
NotSupportedException(bool, string, Exception)
Raises the NotSupportedException(bool, string, Exception).
public void NotSupportedException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
NullReferenceException(bool, string, Exception)
Raises the NullReferenceException(bool, string, Exception).
public void NullReferenceException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
OperationCanceledException(bool, string, Exception, CancellationToken?)
public void OperationCanceledException(bool when, string message = null, Exception innerException = null, CancellationToken? token = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
token
CancellationToken?The cancellation token.
PathTooLongException(bool, string, Exception)
Raises the PathTooLongException(bool, string, Exception).
public void PathTooLongException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
SerializationException(bool, string, Exception)
Raises the SerializationException(bool, string, Exception).
public void SerializationException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
TaskCanceledException(bool, string, Exception)
Raises the TaskCanceledException.
public void TaskCanceledException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
TaskCanceledException(bool, Task)
Raises the TaskCanceledException.
public void TaskCanceledException(bool when, Task task)
Parameters
TimeoutException(bool, string, Exception)
Raises the TimeoutException(bool, string, Exception).
public void TimeoutException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
TypeLoadException(bool, string, Exception)
Raises the TypeLoadException(bool, string, Exception).
public void TypeLoadException(bool when, string message = null, Exception innerException = null)
Parameters
when
boolA condition to throw the exception.
message
stringThe message.
innerException
ExceptionThe inner exception.
UnauthorizedAccessException(bool, string, Exception)
public void UnauthorizedAccessException(bool when, string message = null, Exception innerException = null)