Skip to content

Commit ace962f

Browse files
committed
replace assertions with explicit RuntimeException
1 parent e4b7d78 commit ace962f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ public SentryEvent parse() throws IOException {
5252
event.setMessage(constructMessage(tombstone));
5353
event.setDebugMeta(createDebugMeta(tombstone));
5454
event.setExceptions(createException(tombstone));
55-
assert event.getExceptions() != null;
56-
assert event.getExceptions().size() == 1;
55+
if (event.getExceptions() == null || event.getExceptions().isEmpty()) {
56+
throw new RuntimeException("Failed to decode exception information from tombstone");
57+
}
5758
event.setThreads(createThreads(tombstone, event.getExceptions().get(0)));
5859

5960
return event;

0 commit comments

Comments
 (0)