Skip to content

bug: add more error handling for cursor allocation exception#285

Merged
ajhorst merged 1 commit intomainfrom
AMP-35972_cursor_exception
Jun 21, 2021
Merged

bug: add more error handling for cursor allocation exception#285
ajhorst merged 1 commit intomainfrom
AMP-35972_cursor_exception

Conversation

@ajhorst
Copy link
Contributor

@ajhorst ajhorst commented Jun 21, 2021

Fixes #283

The underlying android exception CursorWindowAllocationException was not correctly getting converted to our own implementation of that exception because its message string was formatted differently. This led to an unhandled RuntimeException being thrown.

This PR also checks for the alternate formatting before converting the exception.

@ajhorst ajhorst requested review from dantetam and haoliu-amp June 21, 2021 17:32
@dantetam
Copy link
Contributor

Makes sense AJ, good investigation. I also thought about the uncaught RuntimeException.

@ajhorst
Copy link
Contributor Author

ajhorst commented Jun 21, 2021

@dantetam yeah, our discussion last week helped me realize this bug wasn't "why is sqlite throwing this exception", but "why is this exception not getting caught"

@dantetam
Copy link
Contributor

Glad I could help you complete the ticket @ajhorst . The exception handling was actually pretty tricky.

Anyway, are you doing the release today? Instructions are on the Confluence pages.

@ajhorst
Copy link
Contributor Author

ajhorst commented Jun 21, 2021

Sure, I can handle the release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crashes: Fatal Exception: android.database.CursorWindowAllocationException

3 participants