Permalink
Browse files

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.
1 parent e80c531 commit a32d92ba1be3c21859d8c1c9e8e0e701846fcaf4 @domenic domenic committed Apr 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/winston/exception.js
View
@@ -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,

0 comments on commit a32d92b

Please sign in to comment.