You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Pr103097.aj 545B

1234567891011121314151617181920212223
  1. import java.io.IOException;
  2. public aspect Pr103097 {
  3. declare soft: IOException:
  4. within(Pr103097) &&
  5. !withincode(* *(..)) &&
  6. !call(* *(..));
  7. before() : execution(* main(..)) {
  8. try {
  9. doThrow();
  10. } catch (IOException e) {
  11. throw new RuntimeException("IOException not softened as expected");
  12. } catch(org.aspectj.lang.SoftException ex) {}
  13. }
  14. public static void doThrow() throws IOException {
  15. throw new IOException("test");
  16. }
  17. public static void main(String args[]) {
  18. }
  19. }