Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Exception handling in aspects / RAD/Aspectj

Marco,

Is MyException in the 'throws' clause of the intercepted method? If it
is not and MyException is a checked exception (does not inherit,
directly or indirectly, from RuntimeException), the compiler should
complain.

Regards,
Fernando

On 7/27/06, Marco Mistroni <mmistroni@xxxxxxxxx> wrote:
hi all,
 i have a small issue.. i have written an aspect that intercepts certain
methods which throw an exception of type
MyException

Now, in my advice if certain conditions are not met, i need to raise an
exception..

the question is: can i declare that exception in my advice?

can ihave an advice like this

before(MyStockDTO stockTrace) throws MyException


is it bad practice?

i m using it iwth AspectJ IN RAD, and every time i modify some code that has
been woven before, RAD gets crazy and gives me an
error like ' can't thrown checked exception MyException  at this join point
method-call  ' ...

weird thing is that the method intercepted is catching the exception .. and
doing a 'clean' of the project will solve everything..

anyone could comment pls?

thanks and regards
 marco



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users





Back to the top