[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Exception handling in aspects / RAD/Aspectj
|
hi matthew,
thanx for reply..
actually, for pointing out, the problem appears whenever i modify some EJB and build
it disapperas only when i do a Project/Clean for the selected project.....
regards
marco
On 7/31/06, Matthew Webster <matthew_webster@xxxxxxxxxx> wrote:
Marco,
You may only throw checked exceptions
in advice that are thrown by the advised join point. This isn't considered
bad practice as you may refactor logic in a method that throws an exception
into an aspect. I suspect the problem that you are seeing, which disappears
with a full build, is related to incremental compilation.
Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/
hello fernando,
yes it is... but i was wondering if in general it was a bad practice
to raise exception from advices (even when the intercepted method
throws the same exception)..
thanx and regards
marco
On 7/29/06, Fernando Castor Filho <fernando.castor@xxxxxxxxx
>
wrote:
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
>
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users