If you are trying to implement the logic of handling the exception then the 
joinpoint "handler" is what you are after.  Here is some sample code on the 
aspectj site to look at:

http://www.eclipse.org/aspectj/sample-code.html#language-handlerContext

Ron DiFrango
Director / Architect  |  CapTech
(804) 855-9196  |  rdifra...@captechconsulting.com

________________________________________
From: aspectj-users-boun...@eclipse.org [aspectj-users-boun...@eclipse.org] on 
behalf of Alexander Kriegisch [alexan...@kriegisch.name]
Sent: Thursday, August 30, 2012 6:24 AM
To: aspectj-users@eclipse.org
Subject: Re: [aspectj-users] can anyone help me to take a look my 
exceptionhandler ?

Yes, I think I can help you if you tell me (in prose, not in code) what
you want to achieve: Do you want to
  a) intercept and log the exceptions in your production code, then pass
     them through (i.e. let them happen)?
  b) intercept and log the exceptions in your production code, but *not*
     pass them through (i.e. catch them)?
  c) just avoid code duplication with try/catch blocks in your test
     cases?
  d) anything else?

--
Alexander Kriegisch


xianglong, 30.08.2012 11:46:
> could you help me to make a simple demo of my example ?("caseName is a
> method name of one testcase")
> I will have a try that drop the *catch* block  in my testcase
>
> On Thu, Aug 30, 2012 at 5:34 PM, Alexander Kriegisch-2 [via AspectJ]
> <[hidden email] </user/SendEmail.jtp?type=node&node=4650506&i=0>> wrote:
>
>     The "after throwing" pointcut, as the name implies, matches joinpoints
>     *after* a method is *throwing* an exception. Your example method
>     "caseName", as far as I understand your code, does *not* throw any
>     exceptions, because it catches them, calls the logger/handler and then
>     exits gracefully.
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to