svelte-error-boundary icon indicating copy to clipboard operation
svelte-error-boundary copied to clipboard

Does not catch error from children components

Open bluwy opened this issue 4 years ago • 1 comments

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!

bluwy avatar Jan 22 '21 11:01 bluwy

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.

jonatansberg avatar Jan 22 '21 16:01 jonatansberg