// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package test;

import java.lang.reflect.Method;

import org.springframework.aop.ThrowsAdvice;

public class TraceExceptionAdvice implements ThrowsAdvice {
    public void afterThrowing(Method m, Object[] args, Object target, Throwable subclass) {
        System.out.println(target.getClass().getName() + "." + m.getName() + " threw exception");
        System.out.println("  " + subclass);
    }
}
