Skip to content

Commit

Permalink
fix(logging): improve consistency of error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Apr 13, 2016
1 parent 3c3de88 commit 3f26bc2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion task/addToBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function bundlePackage (dep) {
}

function fail (err) {
console.error(chalk.red('failed to shrinkpack %s'), dep.id);
console.error(chalk.red('! failed to shrinkpack %s'), dep.id);
throw err;
}
}
2 changes: 1 addition & 1 deletion task/addToCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function cachePackage (dep) {
.catch(fail);

function fail (err) {
console.error(chalk.red('failed to download %s'), dep.id);
console.error(chalk.red('! failed to download %s'), dep.id);
throw err;
}
}
4 changes: 2 additions & 2 deletions task/lib/copyFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ function copyFile (source, target) {
readStream.pipe(writeStream);

function onReadError (err) {
console.error(chalk.red('unable to read file %s'), source);
console.error(chalk.red('! failed to read file %s'), source);
reject(err);
}

function onWriteError (err) {
console.error(chalk.red('unable to write file %s'), target);
console.error(chalk.red('! failed to write file %s'), target);
reject(err);
}

Expand Down
2 changes: 1 addition & 1 deletion task/removeFromBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function removeDep (dep) {
}

function fail (err) {
console.error(chalk.red('failed to remove %s'), dep.id);
console.error(chalk.red('! failed to remove %s'), dep.id);
throw err;
}
}

0 comments on commit 3f26bc2

Please sign in to comment.