JBoss.org Community Documentation

4.2.3. After-Throwing Advice Signature

The fourth type of advice provided by JBoss AOP is the after-throwing type. This advice is invoked only after the execution of a joinpoint that has thrown a java.lang.Throwable or one of its subtypes.

The signature of such an advice is the same as the one for before advices:

public void [advice name]([annotated parameter], [annotated parameter],...[annotated parameter])

Different from the other advice types, an after-throwing advice has a mandatory annotated parameter. This parameter is the exception thrown by the joinpoint execution, as we will see in the next subsection.