00001: class Test1 
00002: {
00003:   public static void main (String[] args)
00004:     throws E1
00005:   {
00006:     int n = Integer.parseInt (args[0]);
00007:     foo (n);
00008:   }
00009:   
00010: 
00011:   static void foo (int n) 
00012:     throws E1
00013:   {
00014:     if (n == 0) {
00015:       throw new E1 ();
00016:     } else if (n == 1) {
00017:       throw new E2 ();
00018:     } else {
00019:       foo (n - 2);
00020:     }
00021:   }
00022: }
00023: