Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Starting in Node 7, stack traces are computed eagerly when using Error.captureStackTrace [1]. As a result, the `message` and `name` properties of an error will not be included in the `stack` property if they are set after calling `Error.captureStackTrace`. As a workaround, set the properties before calling `Error.captureStackTrace`. Note that this change in Node was reverted in V8 a few days ago [2], but it will probably be awhile until that fix appears in a Node release. [1] https://chromium.googlesource.com/v8/v8.git/+/4feafee9d9741259e8ec3882fb61935a235ecc54 [2] https://chromium.googlesource.com/v8/v8.git/+/989d7b96f8352b502e2ede62e0b105e143d03837
- Loading branch information