Repository navigation
Log the component stack of errors no boundary handles - #5297
Merged
Merged
Conversation
|
Size Change: +300 B (+1.88%) Total Size: 16.3 kB 📦 View Changed
ℹ️ View Unchanged
|
📊 Tachometer Benchmark ResultsSummary⏳ Benchmarks are currently running. Results below are out of date. duration
usedJSHeapSize
Results⏳ Benchmarks are currently running. Results below are out of date. create10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
JoviDeCroock
marked this pull request as ready for review
October 4, 2026 05:53
marvinhagemeister
approved these changes
Oct 7, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2323
When an error escapes because no boundary handles it,
preact/debugnow logs which component threw it and its component stack:Until now the stack was only attached to the
errorInfothat boundaries receive, so an uncaught error showed up with a stack that only pointed into Preact. React 19 logs the same information in development.The message is logged right after the error has left Preact, once per escape. An error that passes through several components, gets rethrown by a boundary, or is caught by an outer tree around a nested
render()is reported once or not at all. Refs and unmount cleanups name the component they belong to, and a missing Suspense boundary names the component that suspended. Caught errors are logged as before.It also fixes debug's render and owner stacks, which went stale after a render threw and drifted on every DOM element because
diffedpopped for every vnode.captureOwnerStack()returned leftover components outside render, and later stacks included components from the failed render. Each component now restores the stack lengths from before it was diffed.This does not change where the debugger pauses.
options._catchErrorruns after the error has been caught, sopreact/debugcan't restore "pause on uncaught exceptions"; React 19 no longer pauses there either.