From d6fe53c7de40b79c206094e0f9a4eec76cad90c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E6=A0=91?= Date: Tue, 21 Jul 2015 20:15:08 +0800 Subject: [PATCH] add err.stack on process#uncaughtException for printing error stack --- proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy.js b/proxy.js index efa26bf..845fa3e 100644 --- a/proxy.js +++ b/proxy.js @@ -176,7 +176,7 @@ function proxyServer(option){ }); process.on("uncaughtException",function(err){ - logUtil.printLog('Caught exception: ' + err, logUtil.T_ERR); + logUtil.printLog('Caught exception: ' + (err.stack || err), logUtil.T_ERR); process.exit(); });