Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] pointcut that does not include exception thrown case

define your “after” advice in the following manner…..

 

public aspect loggingAspect {

 

            pointcut loggerPointCut() : execution (* *.*(..));

           

            after() returning : loggerPointCut()

            {

                        System.out.println("Do anything");

                       

            }

}

 

Regards,

Hina.

 

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx]On Behalf Of Maciej Zywno
Sent: Wednesday, September 28, 2005 4:22 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] pointcut that does not include exception thrown case

 

Hi,

Is it possible to define a pointcut in such a way that aspect code is executed only when a method returns  normally i.e. not when an exception is thrown? (I would like my aspect no to be executed when a method throws an exception.)

Thanks,

Maciek


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at netadmin@xxxxxxxxx and delete this mail.
_____________________________________________________________________

Back to the top