Skip to content

fix: Catch errors when emitting events to prevent breaking entire layout#1353

Merged
mofojed merged 2 commits intodeephaven:mainfrom
mofojed:1352-fix-layout-emit
Jun 8, 2023
Merged

fix: Catch errors when emitting events to prevent breaking entire layout#1353
mofojed merged 2 commits intodeephaven:mainfrom
mofojed:1352-fix-layout-emit

Conversation

@mofojed
Copy link
Copy Markdown
Member

@mofojed mofojed commented Jun 7, 2023

@mofojed mofojed added this to the June 2023 milestone Jun 7, 2023
@mofojed mofojed requested a review from mattrunyon June 7, 2023 13:50
@mofojed mofojed self-assigned this Jun 7, 2023
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 7, 2023

Codecov Report

Merging #1353 (37f61f2) into main (5e0db54) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1353   +/-   ##
=======================================
  Coverage   45.95%   45.95%           
=======================================
  Files         494      494           
  Lines       34423    34423           
  Branches     8587     8587           
=======================================
  Hits        15820    15820           
  Misses      18552    18552           
  Partials       51       51           
Flag Coverage Δ
unit 45.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Comment thread packages/golden-layout/src/utils/EventEmitter.ts
mofojed added 2 commits June 8, 2023 13:34
- Added a try/catch around all events that are emitted from Golden Layout
- Added @deephaven/log to golden layout so we can log the error
- Tested using the steps in https://github.com/deephaven/deephaven-js-plugins/issues/26
- Fixes deephaven#1352
- Couldn't get the ignore to work, not interested in rewiring it right now
- The event still gets logged with the LogProxy and still appears in the exported support logs.
@mofojed mofojed force-pushed the 1352-fix-layout-emit branch from 6088707 to 37f61f2 Compare June 8, 2023 17:34
@mofojed mofojed merged commit aac5bd2 into deephaven:main Jun 8, 2023
@mofojed mofojed deleted the 1352-fix-layout-emit branch June 8, 2023 19:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Golden Layout can break if a panel throws while dragging

2 participants