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

[trackedFunction]: fix error handling so Glimmer doesn't die when an error is thrown #87

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

NullVoxPopuli
Copy link
Contributor

See also: qunitjs/qunit#1736

ember-async-data's error handling isn't enough, as it turns out:

https://github.com/tracked-tools/ember-async-data/blob/main/ember-async-data/src/tracked-async-data.ts#L57

so here adds a try/catch with reactive state handling.

@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Feb 27, 2024
Copy link

vercel bot commented Feb 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
reactive ✅ Ready (Inspect) Visit Preview Feb 27, 2024 10:09pm

@NullVoxPopuli NullVoxPopuli merged commit 53c8430 into main Feb 27, 2024
15 checks passed
@NullVoxPopuli NullVoxPopuli deleted the more-tests branch February 27, 2024 22:15
@NullVoxPopuli NullVoxPopuli added bug Something isn't working and removed bug Something isn't working labels Feb 27, 2024
@github-actions github-actions bot mentioned this pull request Feb 27, 2024
@Techn1x
Copy link
Contributor

Techn1x commented Feb 29, 2024

thankyou, I now seem to be able to write tests where I throw an error inside the tracked function, and the test can check that the error handling occurred & error message rendered

@NullVoxPopuli NullVoxPopuli changed the title [trackedFunction]: fix error handling so Glimmer does die when an error is thrown [trackedFunction]: fix error handling so Glimmer doesn't die when an error is thrown Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants