node icon indicating copy to clipboard operation
node copied to clipboard

module: fix error reporting

Open geeksilva97 opened this issue 4 months ago • 14 comments

Refs: #55350 Fixes: #55350

The error is incorrectly reported because the traceSync call is on the stack frame. The code that computes the message was getting the first frame expecting it to have the information needed. Something like

at Object.<anonymous> (/Users/edysilva/test-node/issue-55350/test.cjs:1:1)

With traceSync it's like

 at TracingChannel.traceSync (node:diagnostics_channel:322:14)
 at Object.<anonymous> (/Users/edysilva/test-node/issue-55350/test.cjs:1:1)

This PR fixes this behavior by skipping cutting frames about the user's frame.

geeksilva97 avatar Oct 27 '24 02:10 geeksilva97