Skip to content

Commit b01be8a

Browse files
ref(android): restore catch (Throwable) in captureEnvelope
Same reasoning as the cache change: this catch predates the feature, and narrowing it changed how an Error during capture behaves for every existing caller while leaving the file's three other catch (Throwable) blocks untouched. captureEnvelopeNonTerminating and readEnvelope are new code and keep catch (Exception). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c840fa3 commit b01be8a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ public static SentryId captureEnvelope(
203203
final SentryEnvelope repackagedEnvelope =
204204
new SentryEnvelope(envelope.getHeader(), envelopeItems);
205205
return scopes.captureEnvelope(repackagedEnvelope);
206-
} catch (Exception e) {
207-
options.getLogger().log(SentryLevel.ERROR, "Failed to capture envelope", e);
206+
} catch (Throwable t) {
207+
options.getLogger().log(SentryLevel.ERROR, "Failed to capture envelope", t);
208208
}
209209
return null;
210210
}

0 commit comments

Comments
 (0)