Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Can we access any static join point information in declare error/warning?

I thought we already had an enhancement request open for that, but I
couldn't find it.  Feel free to raise it.  But just to check we both
mean the same thing, in my mind this feature means the static join
point information can be inserted into the message string:

declare warning: execution(@Foo *(..)): "Method %M is annotated Foo!!";

Is that what you mean too?

You can get some way along by registering your own message handler
with AspectJ and processing declare errors/warnings in it.  It at
least gives you the source location to do some extra processing and
possibly augment the text, but I can't quite recall it if gives you
the joinpoint too.

Andy

On 2 March 2010 19:05, Sebastien Tardif <stardif@xxxxxxxxxxxx> wrote:
> Can we access any static join point information in declare error/warning message?
>
> Looks like that should be easy to support.
>
> I want to use this feature to error out only on new policy violation, so first pass is to use warning to find all the violation, and I prefer getting a useful string so that it is easy to copy/paste to the declare error.
>
> End result will be that legacy policy violation will show warning, new policy violation will generate error.
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top