-
Notifications
You must be signed in to change notification settings - Fork 624
Clean up error handling for report persistence #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ensure data written to disk is cleaned up properly when read/write/serialization errors occur.
Codecov Report
Continue to review full report at Codecov.
|
@@ -46,7 +46,13 @@ public CrashlyticsUncaughtExceptionHandler( | |||
public void uncaughtException(Thread thread, Throwable ex) { | |||
isHandlingException.set(true); | |||
try { | |||
crashListener.onUncaughtException(settingsDataProvider, thread, ex); | |||
if (thread == null) { | |||
Logger.getLogger().d("Could not handle uncaught exception; null thread"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about making some of this output logged as errors, since they are basically logging failed asserts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this particular case that makes sense.
Binary Size ReportAffected SDKs
Test Logs |
// called on app start, but keep the current session when called at crash time. Currently | ||
// this only works when called at app start. | ||
List<File> sessionDirectories = capAndGetOpenSessions(currentSessionId); | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot cleaner! 😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally this all looks great. I'd like to see all the debug logging for error conditions use the ERROR log level (or WARN, where appropriate) instead of debug. I'm going to approve the PR as-is so you don't need to wait to merge once those trivial changes are made.
Nice job!
/test device-check-changed |
Ensure data written to disk is cleaned up properly when
read/write/serialization errors occur.