Skip to content

RUM-1094: Let exceptions from Window.Callback to propagate#1632

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-1094/let-exceptions-from-window-callback-to-propagate
Sep 21, 2023
Merged

RUM-1094: Let exceptions from Window.Callback to propagate#1632
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-1094/let-exceptions-from-window-callback-to-propagate

Conversation

@0xnm

@0xnm 0xnm commented Sep 21, 2023

Copy link
Copy Markdown
Member

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 #732

However, 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)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm
0xnm requested a review from a team as a code owner September 21, 2023 10:41
@0xnm
0xnm force-pushed the nogorodnikov/rum-1094/let-exceptions-from-window-callback-to-propagate branch from e48b472 to c04b948 Compare September 21, 2023 10:46
@codecov-commenter

codecov-commenter commented Sep 21, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1632 (c04b948) into develop (956f75e) will decrease coverage by 0.10%.
The diff coverage is 82.61%.

@@             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     
Files Changed Coverage Δ
...ternal/recorder/callback/RecorderWindowCallback.kt 90.91% <77.78%> (-2.33%) ⬇️
.../instrumentation/gestures/WindowCallbackWrapper.kt 85.54% <85.71%> (+0.31%) ⬆️

... and 17 files with indirect coverage changes

@0xnm
0xnm merged commit 06eb391 into develop Sep 21, 2023
@0xnm
0xnm deleted the nogorodnikov/rum-1094/let-exceptions-from-window-callback-to-propagate branch September 21, 2023 13:30
@xgouchet xgouchet added this to the 2.2.0 milestone Dec 13, 2023
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.

4 participants