Permalink
Browse files

Add system info to error reporting

  • Loading branch information...
1 parent 886185e commit ad5a9b70051d279e2ce7f648397de11dc7230a6c @isaacs isaacs committed Feb 23, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/utils/error-handler.js
@@ -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"
@@ -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)
}

0 comments on commit ad5a9b7

Please sign in to comment.