Re: exceptions thrown from advice
Awais Rashid <[email protected]> Mon, 7 Apr 2008 10:49:32 +0100
| Newsgroups | gmane.comp.programming.aspect.general |
|---|---|
| Organization | Lancaster University, UK |
| Message-ID | <[email protected]> |
Dear Florin, The effect of aspects on the exceptional flow of programs poses interesting challenges. In this case, the aspect throws an exception that the other method may or may not be expecting. It also depends on whether the exception has been softened (in AspectJ) or how you may choose to handle the excepion (e.g., using a separate handler aspect). We have a paper coming up at ECOOP this year that studies these various effects for AspectJ programs: Roberta Coelho, Awais Rashid, Alessandro Garcia, Fabiano Ferrari, Nelio Cacho, Uira Kuesza, Arndt von Staa and Carlos Lucena: "Assessing the Impact of Aspects on Exception Flows: An Exploratory Study", European Conference on Object-Oriented Programming, Cyprus, 2008. If you email me offline, I can pass on a copy. Awais. > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Florin-Alexandru Bratu > Sent: 07 April 2008 10:20 > To: [email protected] > Subject: [aosd-discuss] exceptions thrown from advice > > Hello everyone! > > This is more of a general question regarding AOP. If I have > defined an > advice that throws an exception, where is that exception handled? > > For instance: say that I have a method: > > class S{ > public void something() { > // something > } > } > > and that I have an advice that triggers whenever the method starts > executing. The advice is > > class Advice { > public void doOnSomething() throws SomeException { > throw new SomeException(); > } > } > > (suppose the advice is properly configured) > > Now; if I do something like this: > > class Main { > public void other() > // is this necessary? > // throws SomeException > { > new S().something(); > } > } > > > My question is: The call new S().something(); triggers an > exception in > the method other() ? > > Thank you, > Florin > > _______________________________________________ > discuss mailing list - [email protected] > > To unsubscribe and change options, go to: > http://aosd.net/mailman/listinfo/discuss_aosd.net > > Check out the AOSD.net Wiki: http://aosd.net/wiki > _______________________________________________ discuss mailing list - [email protected] To unsubscribe and change options, go to: http://aosd.net/mailman/listinfo/discuss_aosd.net Check out the AOSD.net Wiki: http://aosd.net/wiki