Skip to content

Commit 1b3cf97

Browse files
romanshorynaddaleax
authored andcommitted
doc: prefix of the stacktrace in errors.md
PR-URL: #14150 Fixes: #5675 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Kunal Pathak <[email protected]>
1 parent b717609 commit 1b3cf97

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc/api/errors.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ Error.captureStackTrace(myObject);
221221
myObject.stack; // similar to `new Error().stack`
222222
```
223223

224-
The first line of the trace, instead of being prefixed with `ErrorType:
225-
message`, will be the result of calling `targetObject.toString()`.
224+
The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`.
226225

227226
The optional `constructorOpt` argument accepts a function. If given, all frames
228227
above `constructorOpt`, including `constructorOpt`, will be omitted from the

0 commit comments

Comments
 (0)