Skip to main content

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

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



Back to the top