[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[aspectj-users] Exception dilemma
|
- From: Oliver Böhm <boehm@xxxxxxxxxx>
- Date: Thu, 05 Mar 2009 21:36:42 +0100
- Delivered-to: aspectj-users@eclipse.org
- Organization: Oli's kleines Rechenzentrum
- User-agent: Thunderbird 2.0.0.19 (X11/20090105)
Hallo,
for testing purpose I want to throw an Exception after a method returns:
after() returning throws InterruptedException : applicationCode() {
throw new InterruptedException();
}
This works as expected for methods which throws InterruptedException.
Now I want to make it more general and addresses *all* methods which can
throw an checked exception:
after() returning throws Exception : applicationCode() {
...
}
But here I got an error message ("can't throw checked exception
'java.lang.Exception' at this join point...") which is clear because the
pointcut "applicationCode()" addresses e.g. an InterruptException.
Has anybody a hint or tip how I can realize it without defining an
advice for each possible checked Exception?
regards
Oliver