[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Intercepting constructors that handle exceptions
|
I am not entirely sure about the question, but I think you need
something along the following lines:
void around(Object uc, File f) throws Exception : Test(uc,f) {
try {
proceed(uc, f);
} catch (Exception ex) {
... your exception processing logic
}
}
Or perhaps this:
after() throwing(ex) : Test(uc,f) {
... your exception processing logic
}
-Ramnivas
2009/6/12 João Paulo Sabino de Moraes <jonamep@xxxxxxxxx>:
> Hi Folks,
>
> I've made a pointcut that intercepts a constructor,:
>
> pointcut Test(Bank uc, File f) : execution(public Bank.new(File)) && args(f)
> && this(uc);
>
> the constructor handles an exception...but I don't know how to intercept it.
> I 've tried sorrounding proceed() whit try catch but it didn't run...
>
>
> void around(Object uc, File f) throws Exception : Test(uc,f) {
> ....
> }
>
> so what goes inside around ?
>
> Thanks!!
>
> jp
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>