Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] doesn't a handler-pointcut 'return'?

Hi:

I experimented a bit with the handler-pointcut brought up
by Adreas Guther and Ron DoFrango yesterday.

I want to advice the situation where a handler has cought
an exception, handles it and returns normally without throwing
any further exceptions.

I tried the following:

    pointcut errhandler(Throwable t)
        : in_user_code()
          && handler(*)
          && args(t);

    after(Throwable t) returning
        : errhandler(t)
    {
       // do something
    }

but this doesn't work due to a compiler limitaion
(compiler prints a warning). Does anyone know a
workaround?

--

Regards,

Hermann



---------------------------------------------------------------
Hermann Voßeler
Baader Wertpapierhandelsbank AG / IT
D-85716 Unterschleißheim
Internet: www.baaderbank.de
---------------------------------------------------------------



Back to the top