Format | Assembly Format | Description |
---|---|---|
7A | throw |
Throw an exception. |
…, object → …,
The throw
instruction throws the exception object (type O
) on the stack and empties the stack. For details of the exception mechanism, see Partition I.
[Note: While the CLI permits any object to be thrown, the CLS describes a specific exception class that shall be used for language interoperability. end note]
System.NullReferenceException
is thrown if obj is null.
Correct CIL ensures that object is always either null or an object reference (i.e., of type O
).
There are no additional verification requirements.