diff --git a/test/jdk/jdk/jfr/api/consumer/streaming/TestJVMCrash.java b/test/jdk/jdk/jfr/api/consumer/streaming/TestJVMCrash.java index be5acdddd75a4..e1a95380477ea 100644 --- a/test/jdk/jdk/jfr/api/consumer/streaming/TestJVMCrash.java +++ b/test/jdk/jdk/jfr/api/consumer/streaming/TestJVMCrash.java @@ -40,7 +40,7 @@ */ public class TestJVMCrash { - public static void main(String... args) throws Exception { + public static void main(String... args) { int id = 1; while (true) { try (TestProcess process = new TestProcess("crash-application-" + id++, false /* createCore */)) { @@ -61,6 +61,9 @@ public static void main(String... args) throws Exception { } System.out.println("Incorrect event count. Retrying..."); } + } catch (Exception e) { + System.out.println("Exception: " + e.getMessage()); + System.out.println("Retrying..."); } } }