# throw

## Purpose

Throw the indicated exception.

## Details

Op & Format | Mnemonic / Syntax | Arguments
--- | --- | ---
27 11x | throw vAA | `A:` exception-bearing register (8 bits)

## Constraints

- A must be a valid register index in the current stack frame.
- Register vA must be a reference-bearing register
- Register vA must be assignment-compatible with java.lang.Throwable according to the usual rules of the Java programming language.

## Behavior

- Throws the given exception vA, resulting in a search for a matching handler according to the usual rules of the Java programming language.
- If no matching handler is found for the current thread, the thread terminates, possibly notifying its uncaught exception handler or thread group before.

## Exceptions

- NullPointerException if vA is null.
- Otherwise, the indicated exception.