mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
doc: prefix of the stacktrace in errors.md
PR-URL: https://github.com/nodejs/node/pull/14150 Fixes: https://github.com/nodejs/node/issues/5675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
This commit is contained in:
1 parent
3b4010be31
commit
7f26a291f6
1 file changed
+1
-2
+1
-2
@@ -221,8 +221,7 @@ Error.captureStackTrace(myObject);
|
||||
myObject.stack; // similar to `new Error().stack`
|
||||
```
|
||||
|
||||
The first line of the trace, instead of being prefixed with `ErrorType:
|
||||
message`, will be the result of calling `targetObject.toString()`.
|
||||
The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`.
|
||||
|
||||
The optional `constructorOpt` argument accepts a function. If given, all frames
|
||||
above `constructorOpt`, including `constructorOpt`, will be omitted from the
|
||||
|
||||
Reference in new issue
Block a user