|
1 | 1 | /* |
2 | | - * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
41 | 41 | public class ClhsdbLauncher { |
42 | 42 |
|
43 | 43 | private Process toolProcess; |
| 44 | + private boolean ignoreExceptions; |
44 | 45 |
|
45 | 46 | public ClhsdbLauncher() { |
46 | 47 | toolProcess = null; |
| 48 | + ignoreExceptions = false; |
| 49 | + } |
| 50 | + |
| 51 | + public void ignoreExceptions() { |
| 52 | + ignoreExceptions = true; |
47 | 53 | } |
48 | 54 |
|
49 | 55 | /** |
@@ -147,12 +153,14 @@ private String runCmd(List<String> commands, |
147 | 153 | // -Xcheck:jni might be set via TEST_VM_OPTS. Make sure there are no warnings. |
148 | 154 | oa.shouldNotMatch("^WARNING: JNI local refs:.*$"); |
149 | 155 | oa.shouldNotMatch("^WARNING in native method:.*$"); |
150 | | - // This will detect most SA failures, including during the attach. |
151 | | - oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$"); |
152 | | - oa.shouldNotMatch("sun.jvm.hotspot.utilities.AssertionFailure"); |
153 | | - // This will detect unexpected exceptions, like NPEs and asserts, that are caught |
154 | | - // by sun.jvm.hotspot.CommandProcessor. |
155 | | - oa.shouldNotMatch("^Error: .*$"); |
| 156 | + if (!ignoreExceptions) { |
| 157 | + // This will detect most SA failures, including during the attach. |
| 158 | + oa.shouldNotMatch("^sun.jvm.hotspot.debugger.DebuggerException:.*$"); |
| 159 | + oa.shouldNotMatch("sun.jvm.hotspot.utilities.AssertionFailure"); |
| 160 | + // This will detect unexpected exceptions, like NPEs and asserts, that are caught |
| 161 | + // by sun.jvm.hotspot.CommandProcessor. |
| 162 | + oa.shouldNotMatch("^Error: .*$"); |
| 163 | + } |
156 | 164 |
|
157 | 165 | String[] parts = output.split("hsdb>"); |
158 | 166 | for (String cmd : commands) { |
|
0 commit comments