Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixing uncaught exception handler on Windows. #126

Merged
merged 1 commit into from

2 participants

@domenic

The lack of process.getuid and process.getgid cause it to throw an exception. An exception in the uncaught exception handler is... not good.

@domenic domenic 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.
a32d92b
@domenic

Is there anything else I should do to get this accepted?

@Marak

I think this is OK.

Is there an equivalent value that Windows could return opposed to just null ?

@domenic

I suppose process.env.USERNAME could substitute for uid? It would be misnamed though. And Windows does have a concept similar to Unix groups, but they do not seem to be exposed to Node in any way, and seem sufficiently different that I'm not sure how you would fit them into a gid field.

@Marak Marak merged commit e55fe5e into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 11, 2012
  1. @domenic

    Fixing uncaught exception handler on Windows.

    domenic authored
    The lack of `process.getuid` and `process.getgid` cause it to throw an exception. An exception in the uncaught exception handler is... not good.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/winston/exception.js
View
4 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,
Something went wrong with that request. Please try again.