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

feat: add error boundaries #14211

Merged
merged 46 commits into from
Dec 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
007d5f3
feat: add error boundary support
trueadm Nov 5, 2024
f683ce2
tweak
trueadm Nov 7, 2024
51e49be
Update packages/svelte/elements.d.ts
trueadm Nov 7, 2024
11b2ecd
Update .changeset/polite-peaches-do.md
trueadm Nov 7, 2024
10897ac
fix issue with rethrowing
trueadm Nov 7, 2024
e6b6a68
handle fallback error
trueadm Nov 8, 2024
dc95bd3
handle fallback error
trueadm Nov 8, 2024
b9bc80d
add more test coverage
trueadm Nov 8, 2024
cf11f58
more tests
trueadm Nov 8, 2024
4d8ad24
more bug fixes
trueadm Nov 8, 2024
2c8dea6
guard against non-errors
trueadm Nov 9, 2024
5be2334
add component_stack to error
trueadm Nov 9, 2024
c468c6d
alternative approach
trueadm Nov 11, 2024
3ae0c80
Merge branch 'main' into error-boundaries
trueadm Nov 15, 2024
3441004
remove spread support
trueadm Nov 15, 2024
75a01a5
lint
trueadm Nov 15, 2024
371f118
add to legacy ast
dummdidumm Nov 20, 2024
36dcb7d
Merge branch 'main' into error-boundaries
dummdidumm Nov 20, 2024
3afd1bb
add to svelte-html
dummdidumm Nov 20, 2024
1564640
disallow anything but attributes on the boundary element
dummdidumm Nov 20, 2024
acb3cd0
Merge branch 'main' into error-boundaries
Rich-Harris Nov 26, 2024
bc72ed2
fix error
Rich-Harris Nov 26, 2024
a77bf50
more validation
Rich-Harris Nov 26, 2024
f82a59b
only create block when necessary
Rich-Harris Nov 26, 2024
6aa714e
swap argument order - results in nicer-looking code in many cases
Rich-Harris Nov 26, 2024
b53cfc8
Update .changeset/polite-peaches-do.md
Rich-Harris Nov 26, 2024
1ec18a3
simplify a bit
Rich-Harris Nov 26, 2024
a7ee520
simplify
Rich-Harris Nov 26, 2024
3070f67
move declaration closer to usage
Rich-Harris Nov 26, 2024
fbbb7d9
push once
Rich-Harris Nov 26, 2024
3322856
unused
Rich-Harris Nov 26, 2024
08b82f9
tweaks
Rich-Harris Nov 27, 2024
2d27f50
consistent naming
Rich-Harris Nov 27, 2024
702adf9
simplify
Rich-Harris Nov 27, 2024
69877ae
add a couple newlines
Rich-Harris Nov 27, 2024
8e74719
tweak comments
Rich-Harris Nov 27, 2024
b4a30a4
simplify
Rich-Harris Nov 27, 2024
a81dc34
newlines
Rich-Harris Nov 27, 2024
0fe5274
placeholder documentation
Rich-Harris Nov 27, 2024
62e1af8
add some docs
Rich-Harris Nov 27, 2024
dfdcf02
Update packages/svelte/src/internal/client/dom/blocks/boundary.js
trueadm Nov 27, 2024
b3d1d92
Update packages/svelte/src/internal/client/dom/blocks/boundary.js
trueadm Nov 27, 2024
dc36557
Update packages/svelte/src/internal/client/dom/blocks/boundary.js
trueadm Nov 27, 2024
2b0778e
fix type
trueadm Nov 27, 2024
93b16b1
fix link
Rich-Harris Dec 1, 2024
4509d3b
explain what happens if onerror throws
Rich-Harris Dec 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix type
trueadm committed Nov 27, 2024
commit 2b0778e9ebe96fd732d27fc013d05b4f11449ab7
2 changes: 1 addition & 1 deletion packages/svelte/src/internal/client/dom/blocks/boundary.js
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ function with_boundary(boundary, fn) {
export function boundary(node, props, boundary_fn) {
var anchor = node;

/** @type {Effect | null} */
/** @type {Effect} */
var boundary_effect;

block(() => {