Mark,
In some cases, you can convert the exceptions to unchecked ones (ones that
extend RuntimeException), which don't have to be declared.
static <T extends Throwable> void dynamicThrow(T t) throws T
{
throw t;
}
Today, you can use a special bytecode compiled method, dynamicThrow, that
can throw potentially undeclared checked exceptions. If you want a binary
version that I've already assembled, email me and I'll give it to you.
Cheers,
Ron
Ron Bodkin
Chief Technology Officer
New Aspects of Security
m: (415) 509-2895
------------Original Message-------------
From: "Volkmann, Mark" <Mark.Volkmann@xxxxxxxxxxxxx>
To: "'aspectj-users@xxxxxxxxxxx'" <aspectj-users@xxxxxxxxxxx>
Date: Tue, Aug-19-2003 6:08 AM
Subject: [aspectj-users] exceptions in around advice
I've got an around advice that I want to apply to methods that
throw different types of exceptions. If an exception is thrown in the
actual method when I call proceed() then I want that exception to propagate
back to the caller. I can't say that advice throws java.lang.Exception
because then callers would have to catch that instead of the specific kinds of
exceptions that can really be thrown. How can I get this to
work?
---------------------------------------------------------------------------------------------------------
A.G.
Edwards & Sons' outgoing and incoming e-mails are
electronically
archived and subject to review and/or disclosure to someone
other
than the
recipient.
---------------------------------------------------------------------------------------------------------