From 80ace2c0bba95ea4ef594942dde511ab58b6d10c Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Thu, 1 May 2014 16:18:40 -0700 Subject: [PATCH] add nicer error formatting --- lib/application.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/application.js b/lib/application.js index bab5f95..f01526e 100644 --- a/lib/application.js +++ b/lib/application.js @@ -158,7 +158,9 @@ app.createContext = function(req, res){ app.onerror = function(err){ if (!this.outputErrors) return; if (404 == err.status) return; - console.error(err.stack); + console.error(); + console.error(err.stack.replace(/^/gm, ' ')); + console.error(); }; /**