[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] handler designator
|
The handler pointcut picks out not throw statements but exception
handlers (catch statements) in the code the compiler controls. Be sure
that the exception type name is spelled correctly. If it doesn't work,
please submit a test case as a bug.
Wes
Volkmann, Mark wrote:
I'm just starting to work with AspectJ. Most things I have tried have been
easy to get working, but I can't get the handler designator to work. Here's
what I'm attempting. IllegalTransactionException is my own custom
exception.
pointcut handle(IllegalTransactionException e):
handler(IllegalTransactionException) && args(e);
before(IllegalTransactionException e): handle(e) {
System.out.println("*** EXCEPTION *** " + e.getMessage());
When I run my application, the exception is thrown, but the code in my
before advice never runs.
Can someone offer some quesses as to what I might be doing wrong?
***********************************************************************************
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
************************************************************************************