Throws Throws Class

Definition

Helper class with properties and methods that supply constraints that operate on exceptions.

public class Throws
type Throws = class
Inheritance
ThrowsThrows

Constructors

Throws() Throws()

Properties

ArgumentException ArgumentException

Creates a constraint specifying an expected TargetInvocationException

Exception Exception

Creates a constraint specifying an expected exception

InnerException InnerException

Creates a constraint specifying an exception with a given InnerException

InvalidOperationException InvalidOperationException

Creates a constraint specifying an expected TargetInvocationException

Nothing Nothing

Creates a constraint specifying that no exception is thrown

TargetInvocationException TargetInvocationException

Creates a constraint specifying an expected TargetInvocationException

Methods

InstanceOf(Type) InstanceOf(Type)

Creates a constraint specifying the type of exception expected

InstanceOf<T>() InstanceOf<T>()

Creates a constraint specifying the type of exception expected

TypeOf(Type) TypeOf(Type)

Creates a constraint specifying the exact type of exception expected

TypeOf<T>() TypeOf<T>()

Creates a constraint specifying the exact type of exception expected

Applies to