# move-exception

## Purpose

Save a just-caught exception into the given register. This should be the first instruction of any exception handler whose caught exception is not to be ignored, and this instruction may only ever occur as the first instruction of an exception handler; anywhere else is invalid.

## Details

Op & Format | Mnemonic / Syntax | Arguments
--- | --- | ---
0d 11x | move-exception vAA | `A:` destination register (8 bits)

## Constraints

- A must be a valid register index in the current stack frame.
- The instruction must be the first instruction (in the code array) of an instruction handler, that is, its offset in the code array must match one of the handlers defined for the method in the Dex file.

## Behavior

- The active exception of the current thread is moved to register vA, that is, vA' = exception.
- If register v(A-1) is the lower half of a register pair, register v(A-1)' becomes undefined.
- If register v(A+1) is the upper half of a register pair, register v(A+1)' becomes undefined.

## Exceptions

None.