Skip to content

Commit 063eab8

Browse files
committed
unused
1 parent c4f528a commit 063eab8

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

packages/svelte/src/internal/client/dom/blocks/boundary.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { BOUNDARY_EFFECT, EFFECT_TRANSPARENT } from '#client/constants';
44
import { component_context, set_component_context } from '../../context.js';
5-
import { invoke_error_boundary, reset_is_throwing_error } from '../../error-handling.js';
5+
import { invoke_error_boundary } from '../../error-handling.js';
66
import { block, branch, destroy_effect, pause_effect } from '../../reactivity/effects.js';
77
import {
88
active_effect,
@@ -80,7 +80,6 @@ export function boundary(node, props, boundary_fn) {
8080
with_boundary(boundary, () => {
8181
is_creating_fallback = false;
8282
boundary_effect = branch(() => boundary_fn(anchor));
83-
reset_is_throwing_error();
8483
});
8584
};
8685

@@ -119,7 +118,6 @@ export function boundary(node, props, boundary_fn) {
119118
invoke_error_boundary(error, /** @type {Effect} */ (boundary.parent));
120119
}
121120

122-
reset_is_throwing_error();
123121
is_creating_fallback = false;
124122
});
125123
});
@@ -131,7 +129,6 @@ export function boundary(node, props, boundary_fn) {
131129
}
132130

133131
boundary_effect = branch(() => boundary_fn(anchor));
134-
reset_is_throwing_error();
135132
}, EFFECT_TRANSPARENT | BOUNDARY_EFFECT);
136133

137134
if (hydrating) {

packages/svelte/src/internal/client/error-handling.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@
22
import { DEV } from 'esm-env';
33
import { FILENAME } from '../../constants.js';
44
import { is_firefox } from './dom/operations.js';
5-
import { BOUNDARY_EFFECT, DESTROYED } from './constants.js';
5+
import { BOUNDARY_EFFECT } from './constants.js';
66
import { define_property } from '../shared/utils.js';
77

88
// Used for DEV time error handling
99
/** @param {WeakSet<Error>} value */
1010
const adjusted_errors = new WeakSet();
1111

12-
let is_throwing_error = false;
13-
14-
export function reset_is_throwing_error() {
15-
is_throwing_error = false;
16-
}
17-
1812
/** @type {null | unknown} */
1913
let current_error = null;
2014

@@ -58,20 +52,9 @@ export function invoke_error_boundary(error, effect) {
5852
current = current.parent;
5953
}
6054

61-
is_throwing_error = false;
6255
throw error;
6356
}
6457

65-
/**
66-
* @param {Effect} effect
67-
*/
68-
function should_rethrow_error(effect) {
69-
return (
70-
(effect.f & DESTROYED) === 0 &&
71-
(effect.parent === null || (effect.parent.f & BOUNDARY_EFFECT) === 0)
72-
);
73-
}
74-
7558
/**
7659
* Add useful information to the error message/stack
7760
* @param {Error} error

0 commit comments

Comments
 (0)