Advice

Advice defines pieces of aspect implementation that execute at
well-defined points in the execution of the program. Those points can
be given either by named pointcuts (like the ones you've seen above)
or by anonymous pointcuts. Here is an example of an advice on a named
pointcut:

This after returning advice runs just after each join point picked
out by the (anonymous) pointcut, but only if it returns normally.
The return value can be accessed, and is named x
here. After the advice runs, the return value is returned:

This after throwing advice runs just after each join point picked out by
the (anonymous) pointcut, but only when it throws an exception of type
Exception. Here the exception value can be accessed
with the name e. The advice re-raises the exception
after it's done: