joyent/node — pull request #5293 by hackedy (2013-04-14 02:14:41+00:00)
Title: assert: put info in err.message, not err.name

(fixes #5292)

4716dc6 made assert.equal() and related functions work better by generating a better toString() from the expected, actual, and operator values passed to fail(). Unfortunately, this was accomplished by putting the generated message into the error's `name` property. When you passed in a custom error message, the error would put the custom error into `name` *and* `message`, resulting in helpful string representations like `"AssertionError: Oh no: Oh no"`.

This commit resolves that issue by storing the generated message in the `message` property and leaving the error's name alone.