[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] @AfterThrowing problem

Hi there,

I'm trying to use the @AfterThrowing in order to define my pointcut like this: 
 @AfterThrowing(throwing = "e")
    public void bizLoggerWithException(BizLoggable logData, JoinPoint
    thisJoinPoint,Throwable e) {
    .....// do some stuff
    }



But I get the following error from Eclipse (oepe 12.1.1.0.0):

java.lang.NullPointerException
at org.aspectj.weaver.patterns.BasicTokenSource.makeTokenSource(BasicTokenSource.java:84)
at org.aspectj.weaver.patterns.PatternParser.<init>(PatternParser.java:1884)
at org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.resolveAndSetPointcut(ValidateAtAspectJAnnotationsVisitor.java:388)
at org.aspectj.ajdt.internal.compiler.ast.ValidateAtAspectJAnnotationsVisitor.validateAdvice(Validate ... AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Compile error: NullPointerException thrown: null


Previously I got another error like this: insert the quotation mark after 'e'   or something like that, tough that my syntax was correct. 
Does anyone know how to conquer this bug?

I can define this pointcut and the regarding advice without @AfterThrowing annotation, but I', trying to stick with the annotations ....

Cheers,
Sina