Skip to content

Commit 5a0e0f5

Browse files
committed
Always try to provide improves StackTrace for UnhandledEceptions
1 parent c8684b4 commit 5a0e0f5

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

src/main/java/com/akaita/java/rxjava2debug/ExceptionUtils.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@ static Throwable setRootCause(@NonNull Throwable throwable, @NonNull Throwable r
3333
}
3434

3535
List<Throwable> causes = listCauses(throwable);
36-
if (basePackages != null
37-
&& StackTraceUtils.anyContains(causes, basePackages)) {
38-
return throwable;
39-
} else {
40-
causes.add(rootCause);
41-
return collapseCauses(causes);
42-
}
36+
causes.add(rootCause);
37+
return collapseCauses(causes);
4338
}
4439

4540
private static @NonNull

src/main/java/com/akaita/java/rxjava2debug/StackTraceUtils.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,6 @@ static boolean startsWithAny(@NonNull String input, @NonNull String[] matchers)
6767
return false;
6868
}
6969

70-
static boolean anyContains(List<Throwable> causes, @NonNull String[] basePackages) {
71-
for (Throwable cause : causes) {
72-
StackTraceElement[] stackTrace = cause.getStackTrace();
73-
for (StackTraceElement element : stackTrace) {
74-
if (startsWithAny(element.getClassName(), basePackages)) return true;
75-
}
76-
}
77-
78-
return false;
79-
}
80-
8170
/**
8271
* Parse string containing a <i>single line</i> of a StackTrace
8372
*

0 commit comments

Comments
 (0)