aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/ErroneousExceptionConversion1.java
blob: 9a8f0e2abd6470732dbfdd48d361f252a29e254f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
		}
		
	}
}