Skip to content

chore: introduce SymbolizedError class#890

Merged
szuend merged 1 commit intomainfrom
symbolized-error
Feb 5, 2026
Merged

chore: introduce SymbolizedError class#890
szuend merged 1 commit intomainfrom
symbolized-error

Conversation

@szuend
Copy link
Copy Markdown
Contributor

@szuend szuend commented Feb 5, 2026

The "SymbolizedError" class represents a fully resolved error: The stack trace is fully resolved and (in the future), the full Error.cause chain is also fully resolved.

We'll use the SymbolizedError for both "uncaught exceptions" as well as when logging Error objects to the console (e.g. console.log(new Error()). This means the resolvedArgs array in ConsoleFormatter will contain one SymbolizedError instance for every Error object logged.

@szuend szuend marked this pull request as ready for review February 5, 2026 06:27
@szuend szuend requested a review from OrKoN February 5, 2026 06:27
@szuend
Copy link
Copy Markdown
Contributor Author

szuend commented Feb 5, 2026

@OrKoN: Two things I find awkward in this CL: 1) We have to pass the resolvedStackTraceForTesting into two places, and 2) the resolvedStackTrace only applies to plain console messages, where-as otherwise it's part of SymbolizedError.

@OrKoN
Copy link
Copy Markdown
Collaborator

OrKoN commented Feb 5, 2026

Can we have a SymbolizedStackTrace class and re-use it in both?

@szuend
Copy link
Copy Markdown
Contributor Author

szuend commented Feb 5, 2026

Can we have a SymbolizedStackTrace class and re-use it in both?

Not sure I follow, what would be the difference to DevTools.StackTrace.StackTrace?

@OrKoN
Copy link
Copy Markdown
Collaborator

OrKoN commented Feb 5, 2026

It would be an API that we can take right into Puppeteer :)

@szuend szuend added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit f4cfd46 Feb 5, 2026
21 checks passed
@szuend szuend deleted the symbolized-error branch February 5, 2026 08:08
wolfib pushed a commit to wolfib/chrome-devtools-mcp that referenced this pull request Mar 10, 2026
The "SymbolizedError" class represents a fully resolved error: The stack
trace is fully resolved and (in the future), the full `Error.cause`
chain is also fully resolved.

We'll use the `SymbolizedError` for both "uncaught exceptions" as well
as when logging `Error` objects to the console (e.g. `console.log(new
Error())`. This means the `resolvedArgs` array in `ConsoleFormatter`
will contain one `SymbolizedError` instance for every `Error` object
logged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants