Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Finally block in advice

There's no join point for try blocks, and you can only advise join points in aspectJ.
 
You could refactor the body of the try into a method and write after advise on
the method-call or method-execution join point.
 
hth - Wes
 
 
------------Original Message------------
From: Irum Godil <softwarengineer2004@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Date: Mon, Jan-24-2005 1:16 PM
Subject: [aspectj-users] Finally block in advice
Hi,
I have a piece of code like this:
 
try {
...
}
finally {
...
}
 
Basically, I would like to remove the finally code and move it into an advice. I am not sure how can I capture this, first of all i.e. how to say execute the advice at the end of the try block. Secondly, if I just add a piece of code starting with just "finally" with no "try" around it, i get compiler errors there. Does anyone know what to do?
 
thanks.
 


Do you Yahoo!?
The all-new My Yahoo! What will yours do?

Back to the top