Skip to content

Commit

Permalink
doc: prefix of the stacktrace in errors.md
Browse files Browse the repository at this point in the history
PR-URL: #14150
Fixes: #5675
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
  • Loading branch information
romanshoryn authored and addaleax committed Jul 18, 2017
1 parent b717609 commit 1b3cf97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b3cf97

Please sign in to comment.