Skip to content
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

Handle std::out_of_range exception thrown in getMarkdownWorklet on iOS #610

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

tomekzaw
Copy link
Collaborator

Details

When parser worklet is not found, .at() method throws std::out_of_range exception which currently crashes the app. This PR adds try/catch block around expensify::livemarkdown::getMarkdownWorklet() call in MarkdownParser.mm. After this change, we will skip formatting instead of crashing the app. This is only a partial fix to unify iOS and Android implementation in their current shapes. The root cause will be addressed separately.

Related Issues

Partially fixes #609.

Manual Tests

Linked PRs

@tomekzaw tomekzaw requested a review from j-piasecki January 31, 2025 16:40
@tomekzaw tomekzaw merged commit 657946f into main Jan 31, 2025
5 checks passed
@tomekzaw tomekzaw deleted the @tomekzaw/get-markdown-worklet-try-catch-ios branch January 31, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants