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
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionsException[]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
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
ArgumentException(bool, string, string, Exception)
public void ArgumentException(bool when, string message = null, string paramName = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.A condition to throw the exception.
messagestringThe message.
paramNamestringName of the parameter.
innerExceptionExceptionThe inner exception.
ArgumentNullException(bool, string, Exception)
Raises the ArgumentNullException.
public void ArgumentNullException(bool when, string message, Exception innerException)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
ArgumentNullException(bool, string, string)
Raises the ArgumentNullException.
public void ArgumentNullException(bool when, string paramName = null, string message = null)
Parameters
whenboolA condition to throw the exception.
paramNamestringName of the parameter.
messagestringThe message.
ArgumentOutOfRangeException(bool, string, Exception)
Raises the ArgumentOutOfRangeException.
public void ArgumentOutOfRangeException(bool when, string message, Exception innerException)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe 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
whenboolA condition to throw the exception.
paramNamestringName of the parameter.
actualValueobjectThe value of the argument that causes this exception.
messagestringThe message.
AuthenticationException(bool, string, Exception)
Raises the AuthenticationException(bool, string, Exception).
public void AuthenticationException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
DirectoryNotFoundException(bool, string, Exception)
public void DirectoryNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
DllNotFoundException(bool, string, Exception)
Raises the DllNotFoundException(bool, string, Exception).
public void DllNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
DriveNotFoundException(bool, string, Exception)
Raises the DriveNotFoundException(bool, string, Exception).
public void DriveNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
Exception(bool, string, Exception)
Raises the Exception.
public void Exception(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
FileLoadException(bool, string, string, Exception)
public void FileLoadException(bool when, string message = null, string fileName = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
fileNamestringThe file name.
innerExceptionExceptionThe inner exception.
FileNotFoundException(bool, string, string, Exception)
public void FileNotFoundException(bool when, string message = null, string fileName = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
fileNamestringThe file name.
innerExceptionExceptionThe inner exception.
FormatException(bool, string, Exception)
Raises the FormatException(bool, string, Exception).
public void FormatException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
IndexOutOfRangeException(bool, string, Exception)
public void IndexOutOfRangeException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
InvalidCastException(bool, string, Exception)
Raises the InvalidCastException.
public void InvalidCastException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
InvalidCastException(bool, string, int)
Raises the InvalidCastException.
public void InvalidCastException(bool when, string message, int errorCode)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
errorCodeintThe error code (HRESULT).
InvalidCredentialException(bool, string, Exception)
public void InvalidCredentialException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
InvalidDataException(bool, string, Exception)
Raises the InvalidDataException(bool, string, Exception).
public void InvalidDataException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
InvalidOperationException(bool, string, Exception)
public void InvalidOperationException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
KeyNotFoundException(bool, string, Exception)
Raises the KeyNotFoundException(bool, string, Exception).
public void KeyNotFoundException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
MissingFieldException(bool, string, Exception)
Raises the MissingFieldException.
public void MissingFieldException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
MissingFieldException(bool, string, string)
Raises the MissingFieldException.
public void MissingFieldException(bool when, string className = null, string fieldName = null)
Parameters
whenboolA condition to throw the exception.
classNamestringThe class name.
fieldNamestringThe field name.
MissingMemberException(bool, string, Exception)
Raises the MissingMemberException.
public void MissingMemberException(bool when, string message, Exception innerException)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
MissingMemberException(bool, string, string)
Raises the MissingMemberException.
public void MissingMemberException(bool when, string className = null, string memberName = null)
Parameters
whenboolA condition to throw the exception.
classNamestringThe class name.
memberNamestringThe member name.
MissingMethodException(bool, string, Exception)
Raises the MissingMethodException.
public void MissingMethodException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
MissingMethodException(bool, string, string)
Raises the MissingMethodException.
public void MissingMethodException(bool when, string className = null, string methodName = null)
Parameters
whenboolA condition to throw the exception.
classNamestringThe class name.
methodNamestringThe method name.
NotImplementedException(bool, string, Exception)
Raises the NotImplementedException(bool, string, Exception).
public void NotImplementedException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
NotSupportedException(bool, string, Exception)
Raises the NotSupportedException(bool, string, Exception).
public void NotSupportedException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
NullReferenceException(bool, string, Exception)
Raises the NullReferenceException(bool, string, Exception).
public void NullReferenceException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
OperationCanceledException(bool, string, Exception, CancellationToken?)
public void OperationCanceledException(bool when, string message = null, Exception innerException = null, CancellationToken? token = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
tokenCancellationToken?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
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
SerializationException(bool, string, Exception)
Raises the SerializationException(bool, string, Exception).
public void SerializationException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
TaskCanceledException(bool, string, Exception)
Raises the TaskCanceledException.
public void TaskCanceledException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe 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
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
TypeLoadException(bool, string, Exception)
Raises the TypeLoadException(bool, string, Exception).
public void TypeLoadException(bool when, string message = null, Exception innerException = null)
Parameters
whenboolA condition to throw the exception.
messagestringThe message.
innerExceptionExceptionThe inner exception.
UnauthorizedAccessException(bool, string, Exception)
public void UnauthorizedAccessException(bool when, string message = null, Exception innerException = null)