From 1b3cf9719831b11a054c3354614a5b4cb3dbe062 Mon Sep 17 00:00:00 2001 From: Roman Shoryn Date: Sun, 9 Jul 2017 16:04:07 -0400 Subject: [PATCH] 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 Reviewed-By: Refael Ackermann Reviewed-By: Kunal Pathak --- doc/api/errors.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 4c5828f74b7469..8c12359538b3e3 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -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