Skip to content

Commit e819685

Browse files
thebergamotargos
authored andcommitted
doc: include stack trace difference in ES modules
This change highlights in the docs difference between stack traces for CommonJS modules and ES Modules. Fixes: #39787 PR-URL: #41157 Reviewed-By: James M Snell <[email protected]>
1 parent 5ed8a1c commit e819685

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/api/errors.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ The location information will be one of:
344344
* `plain-filename.js:line:column`, if the frame represents a call internal
345345
to Node.js.
346346
* `/absolute/path/to/file.js:line:column`, if the frame represents a call in
347-
a user program, or its dependencies.
347+
a user program (using CommonJS module system), or its dependencies.
348+
* `<transport-protocol>:///url/to/module/file.mjs:line:column`, if the frame
349+
represents a call in a user program (using ES module system), or
350+
its dependencies.
348351

349352
The string representing the stack trace is lazily generated when the
350353
`error.stack` property is **accessed**.

0 commit comments

Comments
 (0)