doc: fix Error:captureStackTrace description#14150
Closed
romanshoryn wants to merge 2 commits intonodejs:masterfrom
Closed
doc: fix Error:captureStackTrace description#14150romanshoryn wants to merge 2 commits intonodejs:masterfrom
romanshoryn wants to merge 2 commits intonodejs:masterfrom
Conversation
jasnell
approved these changes
Jul 10, 2017
refack
approved these changes
Jul 10, 2017
kunalspathak
approved these changes
Jul 11, 2017
TimothyGu
reviewed
Jul 11, 2017
doc/api/errors.md
Outdated
|
|
||
| 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 `ErrorType.name: message`. |
Member
There was a problem hiding this comment.
It will be myObject.name if myObject.message doesn't exist, or ${myObject.name}: ${myObject.message} if it does. I think it's the ErrorType that's tripping me up a bit.
Contributor
There was a problem hiding this comment.
Agreed.
I'd assume this paragraph and the snippet above it have "evolved" separately and have become disjoint.
the actual formula is:
`${myObject.name || 'Error'}${String(myObject.message) ? (': ' + String(myObject.message)) : ''}`But IMHO `${myObject.name}: ${myObject.message}` is good enough
Contributor
Author
|
@refack , @TimothyGu thanks for the review. I've fixed the line. |
refack
approved these changes
Jul 11, 2017
refack
pushed a commit
to refack/node
that referenced
this pull request
Jul 12, 2017
PR-URL: nodejs#14150 Fixes: nodejs#5675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com>
Contributor
|
Landed in 7f26a29 |
Merged
Contributor
|
is this relevant to behavior in 6.x? |
Contributor
|
ping |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi everyone!
I fixed the wrong sentence in the
Error.captureStackTrace(targetObject[, constructorOpt])part of api/errors doc.Fixes: #5675
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)