blob: 1a0eb093778a2b470ce49fe9f20328f4b9ef8ae9 [file] [log] [blame]
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
3<html>
4
5<head>
6<title>throw</title>
7<link rel=stylesheet href="opcode.css">
8</head>
9
10<body>
11
12<h1>throw</h1>
13
14<h2>Purpose</h2>
15
16<p>
17Throw the indicated exception.
18</p>
19
20<h2>Details</h2>
21
22<table class="instruc">
23<thead>
24<tr>
25 <th>Op &amp; Format</th>
26 <th>Mnemonic / Syntax</th>
27 <th>Arguments</th>
28</tr>
29</thead>
30<tbody>
31<tr>
32 <td>27 11x</td>
33 <td>throw vAA</td>
34 <td><code>A:</code> exception-bearing register (8 bits)<br/></td>
35</tr>
36</tbody>
37</table>
38
39<h2>Constraints</h2>
40
41<ul>
42 <li>
43 A must be a valid register index in the current stack frame.
44 </li>
45 <li>
46 Register vA must be a reference-bearing register
47 </li>
48 <li>
49 Register vA must be assignment-compatible with java.lang.Throwable according
50 to the usual rules of the Java programming language.
51 </li>
52</ul>
Carl Shapirode750892010-06-08 16:37:12 -070053
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080054<h2>Behavior</h2>
55
56<ul>
57 <li>
58 Throws the given exception vA, resulting in a search for a matching handler
59 according to the usual rules of the Java programming language.
60 </li>
61 <li>
62 If no matching handler is found for the current thread, the thread
63 terminates, possibly notifying its uncaught exception handler or thread
64 group before.
65 </li>
66</ul>
67
68<h2>Exceptions</h2>
69
70<ul>
71 <li>
72 NullPointerException if vA is null.
73 </li>
74 <li>
75 Otherwise, the indicated exception.
Carl Shapirode750892010-06-08 16:37:12 -070076 </li>
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080077</ul>
78
79</body>
80</html>