You've convinced me, I'm going back to the language extentions ;)
[EMAIL PROTECTED] wrote on 30/11/2007 09:37:03:
> Usually a verifyerror is our fault in the compiler - anytime you are
> able to create one you should raise a bug. The code style syntax has
> had many many years of testing, the annotation style has not so there
> are still some bugs lurking here and there.
>
> cheers,
> Andy.
>
> On 29/11/2007, Ashley Williams <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > Having converted my aspects to use the @AspectJ style, I'm now getting
a
> > strange error message when a compile my tracing aspect,.
> > First here is the section of code:
> >
> >
> > @Pointcut("execution(@Tracing * *(..)) &&
@annotation(tracing)")
> > void annotatedMethods(Tracing tracing) {
> > }
> >
> > @AfterThrowing(pointcut = "annotatedMethods(tracing)",
throwing =
> > "t")
> > public void logException(JoinPoint thisJoinPoint, Tracing
tracing,
> > Throwable t) {
> > Level level = Level.toLevel(tracing.level());
> > if (logger.isEnabledFor(level)) {
> > logger.log(level,
> > formatter.formatSignatureThrowing(thisJoinPoint),
> > t);
> > }
> > }
> >
> > So I am matching on all methods annotated with @Tracing and logging
the
> > subclass of Throwable that may have been thrown.
> > However when I run my test case i get the following error:
> >
> > java.lang.VerifyError: (class: com/db/abfo/tracing/PojoOne, method:
> > calculate signature: ()V) catch_type not a subclass of Throwable
> >
> > This used to work when I used the aspectj after throwing language
extention
> > form:
> >
> >
> > pointcut annotatedMethods(Tracing tracing) :
execution(@Tracing *
> > *(..)) && @annotation(tracing);
> >
> > after(Tracing tracing) throwing(Throwable t) :
> > annotatedMethods(tracing) {
> > Level level = tracing.level().getLevel();
> > if (logger.isEnabledFor(level)) {
> > logger.log(level,
> > formatter.formatSignatureThrowing(thisJoinPoint),
> > t);
> > }
> > }
> >
> > Any ideas?
> > - Ashley
> > ---
> >
> > This e-mail may contain confidential and/or privileged information.
If you
> > are not the intended recipient (or have received this e-mail in error)
> > please notify the sender immediately and delete this e-mail. Any
> > unauthorized copying, disclosure or distribution of the material in
this
> > e-mail is strictly forbidden.
> >
> > Please refer to
> > http://www.db.com/en/content/eu_disclosures.htm for
> > additional EU corporate and regulatory disclosures.
> >
> > _______________________________________________
> > aspectj-users mailing list
> > [email protected]
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> >
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
---
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and delete this e-mail. Any unauthorized copying,
disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional
EU corporate and regulatory disclosures._______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users