You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.error('An error occurred labelling the icon: ${err}');
Another improvement would be to perhaps standardise the error logging a little, to make sure we print in colour, using chalk, and perhaps even only show the internal error message if a verbose flag like -v is set - but this can happen later.
It also means we could potentially simplify things with something like:
function errorAndExit(errorMessage, internalError, verbose, exitCode) {
console.error(`${chalk.red('error')}: ${errorMessage}`);
if (verbose) {
console.error(`${chalk.red('internal error')}: ${(internalError || '').toString()}`);
}
process.exit(exitCode);
}
Also really I should document in the README what the error codes are and actually use separate error codes for separate conditions, but that's an improvement for another time.
Might be easier to just do:
Another improvement would be to perhaps standardise the error logging a little, to make sure we print in colour, using
chalk
, and perhaps even only show the internal error message if a verbose flag like-v
is set - but this can happen later.It also means we could potentially simplify things with something like:
Also really I should document in the
README
what the error codes are and actually use separate error codes for separate conditions, but that's an improvement for another time.Originally posted by @dwmkerr in #97
The text was updated successfully, but these errors were encountered: