org.aspectj/tests/new/DeclareSoft2.java

22 lines
340 B
Java
Raw Normal View History

2002-12-16 19:51:06 +01:00
import java.io.IOException;
class DeclareSoft2 {
public static void main(String[] x) {
foo();
}
static void foo() throws IOException {
throw new IOException();
}
}
aspect A {
void around(): call(void foo()) {
try { proceed(); }
catch (IOException e) {}
}
declare soft: IOException: call(void foo());
}