[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] @AfterThrowing problem
|
- From: Andy Clement <andrew.clement@xxxxxxxxx>
- Date: Thu, 5 Jul 2012 11:06:48 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pcXOlY6ZFutJEM3jyoGnynP3v8by1x+Ss0BHDSBCTW8=; b=hG2jvLz9OhZCQrnYMZZhzmiYdXRrboqKePpbNxLA440/7PtQlX52Hzw04BjyhLqCfP Ij2jYKXADRsA6PXkixRMhZsawE/PI9+2l4n2PeokTuLqcLX8/nLukLaiDEhaN6SxHbpE c3UkxfiTTc8ZkCamZaU5yFtzrrlCgExJbA0lpHqOnZKoltdnOAogksjuiqwrl/M6c8er 6hpw/xLJLs4KIZa3Yszuv+HVkkPMYpRW2G83u1hJubxPapL3JFQ4LZIWzYPlwW6A1rjy FUeLNGy+EHoQrrSPJOaB3I6/AqUHTt/FbAXKYfWfUBY5zQWIo5rtabmOy10g8xG1PVCh Y+3Q==
Hi
Is the problem just that you haven't specified a pointcut in that
@AfterThrowing?
It is a pretty hideous error message so I raised
https://bugs.eclipse.org/bugs/show_bug.cgi?id=384401 to cover
addressing it.
I made your code compile just by changing the @AfterThrowing to
include a pointcut:
@AfterThrowing(pointcut="execution(* *(..))",throwing = "e")
cheers
Andy
On 4 July 2012 22:50, Sina <my.linked.account@xxxxxxxxxxxxxx> wrote:
> 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
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>