MCPcopy
hub / github.com/sveltejs/svelte / error

Method error

packages/svelte/src/internal/client/dom/blocks/boundary.js:387–405  ·  view source on GitHub ↗

@param {unknown} error

(error)

Source from the content-addressed store, hash-verified

385
386 /** @param {unknown} error */
387 error(error) {
388 // If we have nothing to capture the error, or if we hit an error while
389 // rendering the fallback, re-throw for another boundary to handle
390 if (!this.#props.onerror && !this.#props.failed) {
391 throw error;
392 }
393
394 if (current_batch?.is_fork) {
395 if (this.#main_effect) current_batch.skip_effect(this.#main_effect);
396 if (this.#pending_effect) current_batch.skip_effect(this.#pending_effect);
397 if (this.#failed_effect) current_batch.skip_effect(this.#failed_effect);
398
399 current_batch.oncommit(() => {
400 this.#handle_error(error);
401 });
402 } else {
403 this.#handle_error(error);
404 }
405 }
406
407 /**
408 * @param {unknown} error

Callers 15

#renderMethod · 0.95
migrateFunction · 0.80
invoke_error_boundaryFunction · 0.80
infinite_loop_guardFunction · 0.80
inspectFunction · 0.80
print_errorFunction · 0.80
check_bundleFunction · 0.80
generate-types.jsFile · 0.80
run.jsFile · 0.80

Calls 3

#handle_errorMethod · 0.95
skip_effectMethod · 0.80
oncommitMethod · 0.80

Tested by

no test coverage detected