Note that I don't suggest you merge this as is - it is merely to demonstrate the differences that occur in stack traces when using Node.js 4 to run the tests.
The basic problem is that as a result of https://codereview.chromium.org/21761002 any custom toString method on a subclass of Error is not honoured when building the first line of the stack trace, so a WError does not get the cause added, and an SError is reported as a VError.
Obviously any real fix would either need to allow either result, or would need to find another way to get the expected stack traces.
Note that I don't suggest you merge this as is - it is merely to demonstrate the differences that occur in stack traces when using Node.js 4 to run the tests.
The basic problem is that as a result of https://codereview.chromium.org/21761002 any custom
toString
method on a subclass of Error is not honoured when building the first line of the stack trace, so aWError
does not get the cause added, and anSError
is reported as aVError
.Obviously any real fix would either need to allow either result, or would need to find another way to get the expected stack traces.