From a32d92ba1be3c21859d8c1c9e8e0e701846fcaf4 Mon Sep 17 00:00:00 2001 From: domenic Date: Wed, 11 Apr 2012 12:53:47 -0400 Subject: [PATCH] Fixing uncaught exception handler on Windows. The lack of `process.getuid` and `process.getgid` cause it to throw an exception. An exception in the uncaught exception handler is... not good. --- lib/winston/exception.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/winston/exception.js b/lib/winston/exception.js index 2a01e91c7..03c98dd40 100644 --- a/lib/winston/exception.js +++ b/lib/winston/exception.js @@ -23,8 +23,8 @@ exception.getAllInfo = function (err) { exception.getProcessInfo = function () { return { pid: process.pid, - uid: process.getuid(), - gid: process.getgid(), + uid: process.getuid ? process.getuid() : null, + gid: process.getgid ? process.getgid() : null, cwd: process.cwd(), execPath: process.execPath, version: process.version,