Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Add system info to error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 23, 2011
1 parent 886185e commit ad5a9b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/utils/error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function errorHandler (er) {
er.errno = npm[m] || constants[m]
}
}

switch (er.errno) {
case constants.ECONNREFUSED:
log.error(["If you are using Cygwin, please set up your /etc/resolv.conf"
Expand Down Expand Up @@ -92,6 +93,8 @@ function errorHandler (er) {
,"Just tweeting a tiny part of the error will not be helpful."
].join("\n"))
}
var os = require("os")
log.error(os.type() + " " + os.release(), "System")
exit(typeof er.errno === "number" ? er.errno : 1)
}

Expand Down

0 comments on commit ad5a9b7

Please sign in to comment.