KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > examples > exception > Target


1 /**************************************************************************************
2  * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
3  * http://aspectwerkz.codehaus.org *
4  * ---------------------------------------------------------------------------------- *
5  * The software in this package is published under the terms of the LGPL license *
6  * a copy of which has been included with this distribution in the license.txt file. *
7  **************************************************************************************/

8 package examples.exception;
9
10 /**
11  * @author <a HREF="mailto:jboner@codehaus.org">Jonas BonŽr </a>
12  */

13 public class Target {
14
15     Class JavaDoc c = ExceptionHandlingAspect.class;
16
17     private void method() throws Exception JavaDoc {
18         throw new Exception JavaDoc("exception message");
19     }
20
21     public static void main(String JavaDoc[] args) {
22         Target target = new Target();
23         try {
24             target.method();
25         } catch (Exception JavaDoc e) {
26         }
27     }
28 }
Popular Tags