Make assert.AssertionError instance of Error

This commit is contained in:
Ryan Dahl 2010-01-24 14:39:32 -08:00
parent 3669c75f4d
commit c420c89dbd

View File

@ -47,6 +47,7 @@ assert.AssertionError = function AssertionError (options) {
Error.captureStackTrace(this, stackStartFunction);
}
};
process.inherits(assert.AssertionError, Error);
assert.AssertionError.prototype.toString = function() {
if (this.message) {