2012/12/6 James Cook <james.c...@plumbee.com> > after() throwing(MyRuntimeException ex) : call (* *(..)) > [...]
> Is this down to how AspectJ inspects for which methods are eligible? In > other words is this expected behaviour for RuntimeException child classes? > Currently using 1.6.12 with Java 1.7_09. > AFAIK, AspectJ does not inspect the methods to find if they are eligible, it advises all the pointcuts that match. Especially in the case of a RuntimeException, it has no way to know if such an exception might be thrown in a method or in one of its called methods (and their called methods, etc.). You're not limited to the origin method of the exception as you don't always want to catch an exception right after the method where it's initially thrown, and AspectJ covers all these cases. You need some way to restrict your pointcut. Frank
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users