KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > javadoc > method > Test3


1 package test.javadoc.method;
2 /** Test 3. */
3 public class Test3 {
4
5     /** Do 1.
6      * @throws TestException1 when error occurrs.
7      * @throws TestException2 when error occurrs.
8      */

9     public void doStuff1() throws TestException1, TestException2 {
10         try {
11             doStuff2();
12         } catch (TestException2 e) { }
13         throw new Test3().new TestException1("");
14     }
15     /** Do 2.
16      * @throws TestException2 when error occurrs.
17      */

18     private static void doStuff2() throws TestException2 {
19         throw new TestException2("");
20     }
21     /** Exception 1.
22      */

23     class TestException1 extends Exception JavaDoc {
24         /** Exception 1.
25          * @param messg message
26          */

27         TestException1(String JavaDoc messg) {
28             super(messg);
29         }
30     }
31     /** Exception 2.
32      */

33     public static class TestException2 extends Exception JavaDoc {
34         /** Exception 2.
35          * @param messg message
36          */

37         TestException2(String JavaDoc messg) {
38             super(messg);
39         }
40     }
41 }
42
Popular Tags