author | tzezula |
Sat, 08 Dec 2012 08:19:46 +0100 | |
branch | exceptions |
changeset 285 | c8be2d837788 |
child 287 | 6f696a0ef12f |
permissions | -rw-r--r-- |
1 /*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5 package org.apidesign.vm4brwsr;
7 /**
8 *
9 * @author tom
10 */
11 public class Exceptions {
13 public static int methodWithTryCatchNoThrow() {
14 int res = 0;
15 try {
16 res = 1;
17 } catch (IllegalArgumentException e) {
18 res = 2;
19 }
20 //join point
21 return res;
22 }
24 public static int methodWithTryCatchThrow() {
25 int res = 0;
26 try {
27 res = 1;
28 throw new IllegalArgumentException();
29 } catch (IllegalArgumentException e) {
30 res = 2;
31 }
32 //join point
33 return res;
34 }
36 }