doc: edit Error.captureStackTrace html comment

Edit to the comment in the stack trace capture, highlighting the use of
the constructorOpt argument in errors.md

Fixes: https://github.com/nodejs/node/issues/12289
PR-URL: https://github.com/nodejs/node/pull/12962
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de>
This commit is contained in:
Artur Vieira 2017-05-11 04:51:05 +00:00 committed by Anna Henningsen
parent 2b541471db
commit ef71824740
No known key found for this signature in database
GPG Key ID: D8B9F5AEAE84E4CF

View File

@ -238,7 +238,7 @@ function MyError() {
// Without passing MyError to captureStackTrace, the MyError
// frame would show up in the .stack property. By passing
// the constructor, we omit that frame and all frames above it.
// the constructor, we omit that frame, and retain all frames below it.
new MyError().stack;
```