Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] How to deduce the method owning the catch statement referred by the handler join point?

I have the following advice code:
=========================================================
  pointcut caughtException(Exception e) : handler(Exception+) && args(e);
  before (Exception e) : caughtException(e) && loggedScope() &&
loggedMethodScope() {
    logCaughtException(getLogger(thisJoinPointStaticPart), thisJoinPoint,
e);
  }
=========================================================

My wish is that the logCaughtException method output the name and the
parameters of the method owning the adviced catch statement. However,
thisJoinPoint.getSignature() returns a CatchClauseSignature instance, from
which it is unclear to me how to extract the signature of the owning method.

How can I do it?

Thanks.

--
View this message in context: http://aspectj.2085585.n4.nabble.com/How-to-deduce-the-method-owning-the-catch-statement-referred-by-the-handler-join-point-tp4181004p4181004.html
Sent from the AspectJ - users mailing list archive at Nabble.com.


Back to the top