Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] After Throwing advice called several times when only expecting on ce.

Hello everyone. I am new to the whole AOP scene and I am hoping one of you
can help solve this problem for me.

I have some code that picks out an after throwing joinpoint, but when it
executes and I look at the logging statements, I see that it seems to
execute 4 times. The aspect looks like this:

	after() throwing(CreateEnvelopeException e):
		within(com.blah.edi..*) &&
		call(* com.blah.edi..*(..)) {
			
		Logger logger = getLogger(thisJoinPoint.getThis());
		if (logger.isInfoEnabled()) {
	
logger.info(thisJoinPointStaticPart.getSourceLocation());
			logger.info(e.getMessage(), e);
		}
	}

The joinpoint looks like this:
	throw new CreateEnvelopeException("Envelope version '" + version +
"' is not supported.");

I am using Version 1.1.1 and JDK 1.4.2.

Thanks for your help!
Aaron.


Back to the top