mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-18 02:11:48 +02:00
27 lines
570 B
Java
27 lines
570 B
Java
![]() |
import org.aspectj.lang.*;
|
||
|
import org.aspectj.testing.Tester;
|
||
|
|
||
|
aspect Watchcall {
|
||
|
pointcut myConstructor(): execution(new(..));
|
||
|
|
||
|
before(): myConstructor() {
|
||
|
System.err.println("Entering Constructor");
|
||
|
}
|
||
|
|
||
|
after(): myConstructor() {
|
||
|
System.err.println("Leaving Constructor");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public class ErroneousExceptionConversion1 {
|
||
|
public static void main(String[] args) {
|
||
|
try {
|
||
|
ErroneousExceptionConversion1 c = new ErroneousExceptionConversion1();
|
||
|
Tester.checkFailed("shouldn't get here");
|
||
|
} catch (NoAspectBoundException nab) {
|
||
|
// expected
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|