From bc3e879956674378e4647af86e555a619b380891 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 6 Jul 2011 19:10:23 -0400 Subject: [PATCH] Corrected Warning stack trace --- lib/warn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/warn.js b/lib/warn.js index 7a72bc6..6658805 100644 --- a/lib/warn.js +++ b/lib/warn.js @@ -60,8 +60,8 @@ var Warning = exports.Warning = function( e ) this.name = 'Warning'; this._error = e; - this.stack = this.stack && - this.stack.replace( /^.*?\n+/, + this.stack = e.stack && + e.stack.replace( /^.*?\n+/, this.name + ': ' + this.message + "\n" ); };