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

Swallow the error during the hot-render phase. #814

Merged
merged 2 commits into from
Jan 22, 2018
Merged

Conversation

theKashey
Copy link
Collaborator

try...finally does not catch the error, one should catch it in real.

As result "the error" before and after HRM has the same behavior. We do not changing it now.

@codecov-io
Copy link

codecov-io commented Jan 22, 2018

Codecov Report

Merging #814 into next will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next     #814      +/-   ##
==========================================
+ Coverage   84.31%   84.38%   +0.06%     
==========================================
  Files          23       23              
  Lines         491      493       +2     
  Branches      135      138       +3     
==========================================
+ Hits          414      416       +2     
+ Misses         60       59       -1     
- Partials       17       18       +1
Impacted Files Coverage Δ
...-hot-loader/src/reconciler/hotReplacementRender.js 87.17% <100%> (-0.39%) ⬇️
packages/react-hot-loader/src/logger.js 11.11% <0%> (-11.12%) ⬇️
packages/react-hot-loader/src/AppContainer.dev.js 80% <0%> (+10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 843cd5d...e1d99f5. Read the comment docs.

@gregberge
Copy link
Collaborator

Coverage is decreasing, can you add a little test for this?

@gregberge
Copy link
Collaborator

Hmm, and why not throw it instead of logging?

@theKashey
Copy link
Collaborator Author

Cos error should be thrown by real render. And it should be thrown in the real render.

@gregberge gregberge merged commit d179afe into next Jan 22, 2018
@gregberge gregberge deleted the swallow-the-error branch January 22, 2018 15:05
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.

None yet

3 participants