pull/16091/head
Rich Harris 4 months ago
parent dc7e21d18e
commit dcbd613e30

@ -2,7 +2,7 @@
import { BOUNDARY_EFFECT, EFFECT_TRANSPARENT } from '#client/constants'; import { BOUNDARY_EFFECT, EFFECT_TRANSPARENT } from '#client/constants';
import { component_context, set_component_context } from '../../context.js'; import { component_context, set_component_context } from '../../context.js';
import { reset_is_throwing_error } from '../../error-handling.js'; import { invoke_error_boundary, reset_is_throwing_error } from '../../error-handling.js';
import { block, branch, destroy_effect, pause_effect } from '../../reactivity/effects.js'; import { block, branch, destroy_effect, pause_effect } from '../../reactivity/effects.js';
import { import {
active_effect, active_effect,
@ -115,8 +115,8 @@ export function boundary(node, props, boundary_fn) {
() => reset () => reset
); );
}); });
} catch { } catch (error) {
// do nothing, handle_error has already been invoked invoke_error_boundary(error, /** @type {Effect} */ (boundary.parent));
} }
reset_is_throwing_error(); reset_is_throwing_error();

@ -51,7 +51,7 @@ export function invoke_error_boundary(error, effect) {
current.fn(error); current.fn(error);
return; return;
} catch { } catch {
// Remove boundary flag from effect // Remove boundary flag from effect (TODO is this still useful?)
current.f ^= BOUNDARY_EFFECT; current.f ^= BOUNDARY_EFFECT;
} }
} }

Loading…
Cancel
Save