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 test.handler;
9   
10  import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
11  import org.codehaus.aspectwerkz.joinpoint.CatchClauseRtti;
12  import junit.framework.TestCase;
13  
14  /***
15   * @author <a href="mailto:jboner@codehaus.org">Jonas Bonér </a>
16   */
17  public class HandlerTestAspect {
18      public void before(final JoinPoint joinPoint) throws Throwable {
19          HandlerTest.log("pre ");
20          // AW-276 access the rtti
21          Throwable t = (Throwable) ((CatchClauseRtti)(joinPoint.getRtti())).getParameterValue();
22          if (t == null) {
23              TestCase.fail("handler join point has invalid rttit");
24          }
25      }
26  }