Skip to content

Conversation

@marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Jun 21, 2024

Description

Wraps callbacks passed to the mutations util in try-catch so they don't impact each other when they throw.

See #1508.

Closes #1509.

Function could, essentially equivalently, be const isolateErrors = async func => func(), basically as a more-self-documenting #1509—if anything I think in some browsers and circumstances that actually makes the error log better, compared to console.error, if I recall correctly.

Testing steps

You know... I'm not sure of a great way to reliably trigger the scenario to test this? I can maybe hack something together to ensure that modifiers get called in a certain order to demonstrate the problem. The place I ran into it was createCaughtUpLine throwing with a null input, per #1488, and breaking the boring tag chiclets tweak.

@marcustyphoon marcustyphoon force-pushed the isolate-mutation-errors-catch branch from 35ca753 to ac5034e Compare June 21, 2024 19:54
@marcustyphoon marcustyphoon force-pushed the isolate-mutation-errors-catch branch from ac5034e to ecbc046 Compare June 21, 2024 19:55
@marcustyphoon marcustyphoon linked an issue Jul 18, 2024 that may be closed by this pull request
@marcustyphoon marcustyphoon merged commit 7a281c5 into AprilSylph:master Oct 20, 2025
2 checks passed
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.

Mutations util: Feature errors can break other features

2 participants