|
|
@ -40,7 +40,7 @@ import {
|
|
|
|
set_component_context,
|
|
|
|
set_component_context,
|
|
|
|
set_dev_current_component_function
|
|
|
|
set_dev_current_component_function
|
|
|
|
} from './context.js';
|
|
|
|
} from './context.js';
|
|
|
|
import { handle_error, invoke_error_boundary } from './error-handling.js';
|
|
|
|
import { adjust_error, handle_error, invoke_error_boundary } from './error-handling.js';
|
|
|
|
|
|
|
|
|
|
|
|
let is_flushing = false;
|
|
|
|
let is_flushing = false;
|
|
|
|
|
|
|
|
|
|
|
@ -345,18 +345,17 @@ export function update_reaction(reaction) {
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
// TODO think we can just use active_effect here?
|
|
|
|
var effect = /** @type {Effect} */ (active_effect);
|
|
|
|
var effect = get_effect(reaction);
|
|
|
|
|
|
|
|
|
|
|
|
if (DEV && error instanceof Error) {
|
|
|
|
if (effect) {
|
|
|
|
adjust_error(error, effect);
|
|
|
|
if ((effect.f & EFFECT_RAN) !== 0) {
|
|
|
|
}
|
|
|
|
invoke_error_boundary(error, effect);
|
|
|
|
|
|
|
|
} else if ((effect.f & BOUNDARY_EFFECT) !== 0) {
|
|
|
|
if ((effect.f & EFFECT_RAN) !== 0) {
|
|
|
|
// invoke directly
|
|
|
|
invoke_error_boundary(error, effect);
|
|
|
|
effect.fn(error);
|
|
|
|
} else if ((effect.f & BOUNDARY_EFFECT) !== 0) {
|
|
|
|
} else {
|
|
|
|
// invoke directly
|
|
|
|
throw error;
|
|
|
|
effect.fn(error);
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
throw error;
|
|
|
|
throw error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|