solid icon indicating copy to clipboard operation
solid copied to clipboard

fix catchError propagation

Open mdynnl opened this issue 1 year ago • 3 comments

Summary

Opening this up just for the idea. I initially used a separate const ErrorHandled = Symbol() but changed to ERROR.

fixes https://github.com/solidjs/solid/issues/1895

IMO, catchError should work like one we have in the language. It should stop further execution inside the boundary. Everything outside should work as usual. https://playground.solidjs.com/anonymous/a42cb5b3-37b9-4469-9b48-a5fc0d50937e

How did you test this change?

Added a narrowed down test for catchError though I'm not sure if there's any other edge cases. pnpm test seems to pass including the one added.

mdynnl avatar Jul 18 '24 19:07 mdynnl

⚠️ No Changeset found

Latest commit: bd54cec1889bfb29c2e7a8e690232aa6fd492a94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jul 18 '24 19:07 changeset-bot[bot]

Pull Request Test Coverage Report for Build 9997429348

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 93.602%

Totals Coverage Status
Change from base Build 9751531446: 0.04%
Covered Lines: 4194
Relevant Lines: 4416

💛 - Coveralls

coveralls avatar Jul 18 '24 19:07 coveralls

I'm going to link a conversation I had with Jin which lead to the last change in error behavior: https://dev.to/ninjin/comment/206d2

I'm not saying this doesn't uphold this but I want to review it in this context. I was thinking that moving towards lazy computation would mean we wouldn't want to error out everything but just things that depended on the broken stuff.. That being said we aren't there in current Solid so we have to make a decision.

ryansolid avatar Jul 23 '24 21:07 ryansolid