From 26cc94c194549e2b0c6245916bf57d1dd5ad2897 Mon Sep 17 00:00:00 2001 From: acolyer Date: Fri, 10 Feb 2006 18:00:52 +0000 Subject: [PATCH] Progress on: empty catch block warning - test cases --- tests/bugs150/pr82989.aj | 1 + .../swallowedExceptions/SwallowedException.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/features151/swallowedExceptions/SwallowedException.java diff --git a/tests/bugs150/pr82989.aj b/tests/bugs150/pr82989.aj index 76ce57827..fabab94e4 100644 --- a/tests/bugs150/pr82989.aj +++ b/tests/bugs150/pr82989.aj @@ -13,6 +13,7 @@ privileged aspect B { try { m1(); } catch(E e) { // accessor generated for m1() should be defined to throw E + System.err.println(e); } } } diff --git a/tests/features151/swallowedExceptions/SwallowedException.java b/tests/features151/swallowedExceptions/SwallowedException.java new file mode 100644 index 000000000..db1b1849f --- /dev/null +++ b/tests/features151/swallowedExceptions/SwallowedException.java @@ -0,0 +1,17 @@ +public class SwallowedException { + + public void foo() throws Exception { + throw new Exception("ta da!"); + } + + public void bar() { + try { + foo(); + } + catch(Exception ex) { + // yum yum + } + } + + +} \ No newline at end of file -- 2.39.5