|
Last change
on this file since 141 was 2, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
332 bytes
|
| Line | |
|---|
| 1 | // Some tests of `throw'.
|
|---|
| 2 |
|
|---|
| 3 | public class Throw_1
|
|---|
| 4 | {
|
|---|
| 5 | public static Throwable get ()
|
|---|
| 6 | {
|
|---|
| 7 | return null;
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | public static void main (String[] args)
|
|---|
| 11 | {
|
|---|
| 12 | Throwable t = get ();
|
|---|
| 13 | try
|
|---|
| 14 | {
|
|---|
| 15 | throw t;
|
|---|
| 16 | }
|
|---|
| 17 | catch (NullPointerException y)
|
|---|
| 18 | {
|
|---|
| 19 | }
|
|---|
| 20 | catch (Throwable x)
|
|---|
| 21 | {
|
|---|
| 22 | System.out.println ("no");
|
|---|
| 23 | }
|
|---|
| 24 | }
|
|---|
| 25 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.