[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] pointcut help
|
I'm trying to join on different part of my code. Some methods throw exceptions, and some don't. I'd like to advise each type of method differently. I have the following pointcuts:
pointcut exceptionThrowers() : execution(public * my.package..*.*(..) throws Exception+ );
Object around() throws Exception : exceptionThrowers()
{
// Waves hands...
}
pointcut nonExceptionThrowers() : execution(public * my.package..*.*(..)) && !exceptionThrowers();
Object around() : nonExceptionThrowers()
{
// Wave hands...
}
When I run the code, the only advice ran is the around() : nonExceptionThrowers(). What do I need to do to advise exception throwing and non-exception throwing code differently? Is my nonException pointcut hiding the exceptionThrowing pointcut?
thanks,
---
Keith Sader
Nash Resources Group sub-contracting for Computer Sciences Corporation
IAD:TFAS
Email:keith.d.sader@xxxxxxxx
We've got a blind date with destiny, and it looks like she ordered the lobster.