Skip to content

Commit

Permalink
[ios] Fix hermes inspector exception is uncaught and crash the app.
Browse files Browse the repository at this point in the history
close ENG-9172
  • Loading branch information
Kudo authored and gabrieldonadel committed Mar 14, 2024
1 parent e8f22a7 commit 9a5e9c8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ std::optional<UserCallbackException> runUserCallback(C &cb, A &&...arg) {
cb(std::forward<A>(arg)...);
} catch (const std::exception &e) {
return UserCallbackException(e);
} catch (const std::runtime_error &e) {
// NOTE(kudo): Adding this to catch Hermes inspector exceptions after SDK 49.
// I still not figure out why the std::runtime_error is not catched by the std::exception above.
return UserCallbackException(e);
}

return {};
Expand Down

0 comments on commit 9a5e9c8

Please sign in to comment.