Skip to content

Commit

Permalink
clean up code for #587 close
Browse files Browse the repository at this point in the history
  • Loading branch information
Contra committed Jul 14, 2014
1 parent c61c245 commit 8fdf0ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/gulp.js
Expand Up @@ -147,18 +147,18 @@ function formatError(e) {
return e.message;
}

if (typeof e.err === 'string') {
return new Error(e.err).stack;
}

// PluginError
if (typeof e.err.showStack === 'boolean') {
return e.err.toString();
} else {
}

// normal error
if (e.err.stack) {
return e.err.stack;
}

return String(e.err);
// unknown (string, number, etc.)
return new Error(String(e.err)).stack;
}

// wire up logging events
Expand Down

0 comments on commit 8fdf0ab

Please sign in to comment.