Skip to content

Commit 688a43f

Browse files
ref(cache): restore catch (Throwable) in the envelope session reader
Narrowing this pre-existing catch was incidental to the feature and the only thing in this PR that alters existing behaviour: an Error while parsing the session item used to be swallowed so the store continued and the envelope still reached disk, whereas propagating it abandons the store partway. It was also inconsistent, converting one of six catch (Throwable) blocks in this file simply because the edit landed next to it. The new readSessionFromDisk keeps catch (Exception), so new code still refuses to swallow fatal errors. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f4dfc80 commit 688a43f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎sentry/src/main/java/io/sentry/cache/EnvelopeCache.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ private void writeCrashMarkerFile() {
308308
} else {
309309
return session;
310310
}
311-
} catch (Exception e) {
311+
} catch (Throwable e) {
312312
options.getLogger().log(ERROR, "Item failed to process.", e);
313313
}
314314
} else {

0 commit comments

Comments
 (0)