1
import org.aspectj.lang.*;
3
public class AfterThrowingAdviceSyntaxError {
5
public static void main(String[] args) {
9
private static void perform() {
10
Object nullObj = null;
15
aspect ExceptionLoggerAspectV2
18
pointcut exceptionLogMethods()
19
: call(* *.*(..)) && !within(ExceptionLoggerAspectV2);
21
after() thowing(Throwable ex) : exceptionLogMethods() {
22
Signature sig = thisJoinPointStaticPart.getSignature();
23
System.out.printl("WARNING: "
24
+ sig.getDeclaringType().getName() + " "
26
+ "Exception logger aspect " + ex);
b'\\ No newline at end of file'