Skip to content

feat: Add location() to WebError#39767

Open
cpAdm wants to merge 2 commits intomicrosoft:mainfrom
cpAdm:feat-location-weberror
Open

feat: Add location() to WebError#39767
cpAdm wants to merge 2 commits intomicrosoft:mainfrom
cpAdm:feat-location-weberror

Conversation

@cpAdm
Copy link
Contributor

@cpAdm cpAdm commented Mar 19, 2026

  • Sticked with same return type as ConsoleMessage.location()

Closes: #39687

return { message, stackLines, location };
}

export function errorLocationFromStack(error: Error | undefined, pathSeparator: string, showInternalStackFrames: boolean = false): {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code works for Node.js (V8), it does not work for errors in WebKit / Firefox.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new test passes for all browser. So I am not sure what to do?
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should plumb the location all the way from the browser-specific protocol event to here. It should be already available in the protcol.

@cpAdm cpAdm requested a review from pavelfeldman March 22, 2026 14:28
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.

[Feature]: Add location to WebError

3 participants