From Nitesh.jain at qwest.com Fri Feb 18 05:53:21 2005 From: Nitesh.jain at qwest.com (Jain, Nitesh) Date: Thu Mar 23 12:03:22 2006 Subject: [Eos-discuss] Is proceed() supported in around advice Message-ID: Hi, Is proceed() supported in around advice. Here is my code public aspect ExceptionAspect { pointcut p1() : execution(public any BusinessManager.EmployeeManager.AddKnowledge(..)); object around() : p1(){ try{ return proceed(); } catch(System.Exception ex) { throw new System.Exception("My Exception", ex); } } }//class ends And I get an error saying: error CS0103: The name 'proceed' does not exist in the class or namespace 'ExceptionAspect' Thanks, Nitesh From Nitesh.jain at qwest.com Fri Feb 18 08:46:19 2005 From: Nitesh.jain at qwest.com (Jain, Nitesh) Date: Thu Mar 23 12:03:22 2006 Subject: [Eos-discuss] How to get method name Message-ID: Hi, Can someone tell me how to get the method name from a generic advice in Eos Is there something similer to Signature as it is in AspectJ. pointcut p1() : execution(public any any.any(..)); before : p1() { //How to get for which method this advice was executed. } Thanks Nitesh From hridesh at gmail.com Fri Feb 18 11:56:05 2005 From: hridesh at gmail.com (Hridesh Rajan) Date: Thu Mar 23 12:03:22 2006 Subject: [Eos-discuss] Is proceed() supported in around advice In-Reply-To: References: Message-ID: <12367b6605021808563b285af1@mail.gmail.com> Hi Nitesh, In Eos special call "proceed" is replaced by a normal object-oriented call. So your advice will be written as: public aspect ExceptionAspect { pointcut p1() : execution(public any BusinessManager.EmployeeManager.AddKnowledge(..)); object around() : p1(){ try{ return adp.InnerInvoke(); // Proceed Syntax in Eos } catch(System.Exception ex) { throw new System.Exception("My Exception", ex); } } }//class ends Hope it helps and thank you for using Eos. Rajan On Fri, 18 Feb 2005 04:53:21 -0600, Jain, Nitesh wrote: > Hi, > Is proceed() supported in around advice. > Here is my code > > public aspect ExceptionAspect { > pointcut p1() : execution(public any > BusinessManager.EmployeeManager.AddKnowledge(..)); > > object around() : p1(){ > try{ > return proceed(); > } > catch(System.Exception ex) { > throw new System.Exception("My Exception", ex); > } > } > }//class ends > > And I get an error saying: error CS0103: The name 'proceed' does not > exist in the class or namespace 'ExceptionAspect' > > Thanks, > Nitesh > > _______________________________________________ > Eos-discuss mailing list > Eos-discuss@cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/eos-discuss > > From Nitesh.jain at qwest.com Mon Feb 21 02:26:44 2005 From: Nitesh.jain at qwest.com (Jain, Nitesh) Date: Thu Mar 23 12:03:22 2006 Subject: [Eos-discuss] Is proceed() supported in around advice Message-ID: Thanks Hridesh, It works. Could you also tell me, what is the syntax to get the name of method for which advice was executed. So that I could write something like "Exception occured at method : " Thanks and Regards, Nitesh -----Original Message----- From: Hridesh Rajan [mailto:hridesh@gmail.com] Sent: Friday, February 18, 2005 10:26 PM To: Jain, Nitesh Cc: eos-discuss@cs.virginia.edu Subject: Re: [Eos-discuss] Is proceed() supported in around advice Hi Nitesh, In Eos special call "proceed" is replaced by a normal object-oriented call. So your advice will be written as: public aspect ExceptionAspect { pointcut p1() : execution(public any BusinessManager.EmployeeManager.AddKnowledge(..)); object around() : p1(){ try{ return adp.InnerInvoke(); // Proceed Syntax in Eos } catch(System.Exception ex) { throw new System.Exception("My Exception", ex); } } }//class ends Hope it helps and thank you for using Eos. Rajan On Fri, 18 Feb 2005 04:53:21 -0600, Jain, Nitesh wrote: > Hi, > Is proceed() supported in around advice. > Here is my code > > public aspect ExceptionAspect { > pointcut p1() : execution(public any > BusinessManager.EmployeeManager.AddKnowledge(..)); > > object around() : p1(){ > try{ > return proceed(); > } > catch(System.Exception ex) { > throw new System.Exception("My Exception", ex); > } > } > }//class ends > > And I get an error saying: error CS0103: The name 'proceed' does not > exist in the class or namespace 'ExceptionAspect' > > Thanks, > Nitesh > > _______________________________________________ > Eos-discuss mailing list > Eos-discuss@cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/eos-discuss > >