Skip to content

Commit

Permalink
Remove spurious er.code = assignments.
Browse files Browse the repository at this point in the history
They literally do nothing in all cases.
  • Loading branch information
domenic committed Jun 25, 2014
1 parent 0b3d5b9 commit 6c146fb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/utils/error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ function errorHandler (er) {
break

case "ELIFECYCLE":
er.code = "ELIFECYCLE"
log.error("", er.message)
log.error("", ["","Failed at the "+er.pkgid+" "+er.stage+" script."
,"This is most likely a problem with the "+er.pkgname+" package,"
Expand All @@ -126,7 +125,6 @@ function errorHandler (er) {
break

case "ENOGIT":
er.code = "ENOGIT"
log.error("", er.message)
log.error("", ["","Failed using git."
,"This is most likely not a problem with npm itself."
Expand All @@ -135,7 +133,6 @@ function errorHandler (er) {
break

case "EJSONPARSE":
er.code = "EJSONPARSE"
log.error("", er.message)
log.error("", "File: "+er.file)
log.error("", ["Failed to parse package.json data."
Expand All @@ -146,7 +143,6 @@ function errorHandler (er) {
break

case "E404":
er.code = "E404"
var msg = [er.message]
if (er.pkgid && er.pkgid !== "-") {
msg.push("", "'"+er.pkgid+"' is not in the npm registry."
Expand All @@ -168,7 +164,6 @@ function errorHandler (er) {
break

case "EPUBLISHCONFLICT":
er.code = "EPUBLISHCONFLICT"
log.error("publish fail", ["Cannot publish over existing version."
,"Update the 'version' field in package.json and try again."
,""
Expand All @@ -181,7 +176,6 @@ function errorHandler (er) {
break

case "EISGIT":
er.code = "EISGIT"
log.error("git", [er.message
," "+er.path
,"Refusing to remove it. Update manually,"
Expand All @@ -190,7 +184,6 @@ function errorHandler (er) {
break

case "ECYCLE":
er.code = "ECYCLE"
log.error("cycle", [er.message
,"While installing: "+er.pkgid
,"Found a pathological dependency case that npm cannot solve."
Expand All @@ -199,7 +192,6 @@ function errorHandler (er) {
break

case "EBADPLATFORM":
er.code = "EBADPLATFORM"
log.error("notsup", [er.message
,"Not compatible with your operating system or architecture: "+er.pkgid
,"Valid OS: "+er.os.join(",")
Expand Down

0 comments on commit 6c146fb

Please sign in to comment.