Skip to content

chore: avoid reporting inspections when an exception occurs #13601

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

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Oct 14, 2024

Fixes #13577. If we encounter a runtime exception when getting the values for an inspection we bail out reporting the inspection. This can occur naturally because inspect effects are run sync, and thus they can operate before a parent render effect runs that would have invalidated the inspect effect had they not be sync.

Copy link

changeset-bot bot commented Oct 14, 2024

🦋 Changeset detected

Latest commit: d412d69

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

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

@trueadm
Copy link
Contributor Author

trueadm commented Oct 17, 2024

@Rich-Harris and I spoke about this PR and the behaviour of swallowing possible user-errors from the inspection. We decided on the behaviour being that we always console.error the error so it's at least known about – whilst keeping the catch so that execution doesn't break from the inspection.

@trueadm trueadm merged commit e21e624 into main Oct 17, 2024
9 checks passed
@trueadm trueadm deleted the inspect-catch-exception branch October 17, 2024 15:08
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.

Svelte5: $inspect fails when an nested array/object inside state is not present after state update
2 participants