You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/fixtures/scenarios/src/main/java/com/bugsnag/mazerunner/scenarios/IgnoredExceptionWildcardScenario.java
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
importcom.bugsnag.Bugsnag;
4
4
5
+
importjava.util.regex.Pattern;
6
+
5
7
/**
6
8
* Attempts to send ignored handled exceptions using regex patterns to Bugsnag,
7
9
* which should not result in any operation.
@@ -15,7 +17,7 @@ public IgnoredExceptionWildcardScenario(Bugsnag bugsnag) {
15
17
@Override
16
18
publicvoidrun() {
17
19
// Use regex pattern to ignore all java.lang exceptions
Copy file name to clipboardExpand all lines: features/fixtures/scenarios/src/main/java/com/bugsnag/mazerunner/scenarios/MultipleWildcardPatternsScenario.java
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
importcom.bugsnag.Bugsnag;
4
4
5
+
importjava.util.regex.Pattern;
6
+
5
7
/**
6
8
* Tests multiple regex patterns working together.
7
9
*/
@@ -15,9 +17,9 @@ public MultipleWildcardPatternsScenario(Bugsnag bugsnag) {
15
17
publicvoidrun() {
16
18
// Set multiple regex patterns: matching specific packages and classes
17
19
bugsnag.setDiscardClasses(
18
-
"java\\.io\\..*", // All java.io exceptions
19
-
"java\\.lang\\.IllegalStateException", // Exact match
20
-
"java\\.lang\\.Illegal.*"// All IllegalXException classes
20
+
Pattern.compile("java\\.io\\..*"), // All java.io exceptions
21
+
Pattern.compile("java\\.lang\\.IllegalStateException"), // Exact match
22
+
Pattern.compile("java\\.lang\\.Illegal.*")// All IllegalXException classes
0 commit comments