RUM-1094: Let exceptions from Window.Callback to propagate#1632
Merged
0xnm merged 1 commit intoSep 21, 2023
Merged
Conversation
0xnm
force-pushed
the
nogorodnikov/rum-1094/let-exceptions-from-window-callback-to-propagate
branch
from
September 21, 2023 10:46
e48b472 to
c04b948
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1632 +/- ##
===========================================
- Coverage 83.81% 83.71% -0.10%
===========================================
Files 455 455
Lines 15686 15684 -2
Branches 2331 2333 +2
===========================================
- Hits 13147 13129 -18
- Misses 1916 1933 +17
+ Partials 623 622 -1
|
xgouchet
approved these changes
Sep 21, 2023
mariusc83
approved these changes
Sep 21, 2023
0xnm
deleted the
nogorodnikov/rum-1094/let-exceptions-from-window-callback-to-propagate
branch
September 21, 2023 13:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
After checking our telemetry I found some customer-specific exceptions reported. Turns out we are swallowing exceptions thrown from the wrapped
Window.Callback, which it seems is not the right approach - we need to let them propagate, so that customer is aware of them. This PR basically reverts what was done in #732However, we need to catch exceptions related to the delegate calling - argument can be
null, while delegate can exception only non-null values. Such exceptions were the case in the past, but it seems that at least Kotlin 1.8 is now smarter and doesn't generate the null-parameter check as before. But I still left such exception handling just to avoid regressions in the future Kotlin compiler releases.Review checklist (to be filled by reviewers)