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

Does not catch error from children components #3

Open
bluwy opened this issue Jan 22, 2021 · 1 comment
Open

Does not catch error from children components #3

bluwy opened this issue Jan 22, 2021 · 1 comment

Comments

@bluwy
Copy link

bluwy commented Jan 22, 2021

Repro: https://svelte.dev/repl/239f64a51b1448649b591b1522cef54c?version=3.31.2

When wrapping the Boundary component around any Svelte component, the errors aren't caught by Boundary.

I'm not sure if this is a bug, or a limitation of this library, but it would be great to have this documented in the readme if it's not fixable.

Thanks!

@jonatansberg
Copy link
Member

That you for reporting this. This does indeed seem to be either a bug or – more likely – a limitation of the current implementation.

As it is now, updates that are not caused "above" the boundary won't go though it. Put another way, self contained updates (like the one caused by the on:click handler in MakeError) won't get caught as the error boundary is completely unaware of them.

These very precise updates are a main feature of Svelte, but they do indeed make catching errors a lot harder.

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

No branches or pull requests

2 participants