Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

DeclareSoft2.java 340B

123456789101112131415161718192021
  1. import java.io.IOException;
  2. class DeclareSoft2 {
  3. public static void main(String[] x) {
  4. foo();
  5. }
  6. static void foo() throws IOException {
  7. throw new IOException();
  8. }
  9. }
  10. aspect A {
  11. void around(): call(void foo()) {
  12. try { proceed(); }
  13. catch (IOException e) {}
  14. }
  15. declare soft: IOException: call(void foo());
  16. }