Skip to content

Commit

Permalink
doc: Include stack trace diff in ES Modules
Browse files Browse the repository at this point in the history
This change highlihts in the docs difference between stack traces for CJS modules and ES Modules.

Fixes: #39787
  • Loading branch information
thebergamo committed Dec 13, 2021
1 parent ad91abc commit 44d2b15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/api/errors.md
Expand Up @@ -344,7 +344,9 @@ The location information will be one of:
* `plain-filename.js:line:column`, if the frame represents a call internal
to Node.js.
* `/absolute/path/to/file.js:line:column`, if the frame represents a call in
a user program, or its dependencies.
a user program (using commonJS module system), or its dependencies.
* `<transport-protocol>:///file/url/path/to/file.mjs:line:column`, if the frame represents a call in
a user program (using ES module system), or its dependencies.

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

0 comments on commit 44d2b15

Please sign in to comment.