Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] can anyone help me to take a look my exceptionhandler ?

@Alexander
option c is my concern
very appreciate for your help , thanks again .

@Ron
thank you so much for your info
Just studying on that website

On Thu, Aug 30, 2012 at 10:46 PM, Ron DiFrango-2 [via AspectJ] <[hidden email]> wrote:
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
<a href="" value="+18048559196" target="_blank">(804) 855-9196  |  [hidden email]

________________________________________
From: [hidden email] [[hidden email]] on behalf of Alexander Kriegisch [[hidden email]]
Sent: Thursday, August 30, 2012 6:24 AM
To: [hidden email]
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
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users



If you reply to this email, your message will be added to the discussion below:
http://aspectj.2085585.n4.nabble.com/can-anyone-help-me-to-take-a-look-my-exceptionhandler-tp4650503p4650508.html
To unsubscribe from can anyone help me to take a look my exceptionhandler ?, click here.
NAML



View this message in context: Re: can anyone help me to take a look my exceptionhandler ?
Sent from the AspectJ - users mailing list archive at Nabble.com.

Back to the top