Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] AspectJ question

You can't throw a checked exception that the join point is not declared to throw;
that's one of the responsibilities of a Java compiler. Wrap the checked exception
in an unchecked one if you must.  See
 
 
Wes
 
------------Original Message------------
From: Marco Mistroni <mmistroni@xxxxxxxxx>
To: "AspectJ Development Tools developer discussions" <ajdt-dev@xxxxxxxxxxx>
Date: Fri, Feb-3-2006 5:47 AM
Subject: [ajdt-dev] AspectJ question
hello all,
sorry for hte partially OT question (it is aspectj related)
 
i have this problem.
 
i have an advice that should be executed AFTER methodX returns successfully. (easy so far)
the big problem that i have is that my advice does some computation which can
throws  an Exception, and if it does i want to propagate it to the user
 
i was not able to add a throw claus eto this construct
 
after(String s) returning: mypointcut(s)  {
 
    try {
         // do somoe computation
   } catch(MyExeption e) {
        // propagate it to the user
   }
}
 
anyone could help?
 
thanks in advance a nd regards
 marco
  
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev

Back to the top