@param {unknown} error
(error)
| 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 |
no test coverage detected