Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function halt (err) {
if (err.code === 'EPIPE') process.exit(0) /* no big deal */
if (config) {
if (config.verbose) {
console.error(ansi.format(err.stack || err, 'red'))
} else {
console.error(ansi.format('Error: ' + err.message, 'red'))
console.error(ansi.format('(run jsdoc2md with --verbose for a stack trace)', 'red'))
}
} else {
console.error(ansi.format(err.message, 'red'))
}
console.error(usage)
process.exitCode = 1
}
function halt (err) {
if (err.code === 'EPIPE') process.exit(0) /* no big deal */
if (config) {
if (config.verbose) {
console.error(ansi.format(err.stack || err, 'red'))
} else {
console.error(ansi.format('Error: ' + err.message, 'red'))
console.error(ansi.format('(run jsdoc2md with --verbose for a stack trace)', 'red'))
}
} else {
console.error(ansi.format(err.message, 'red'))
}
console.error(usage)
process.exitCode = 1
}
error: function (error) {
if (error) {
Logger.trace();
var error_msg = ansi.format(_.trim(error.message || error), 'red');
if (log_file_path) {
try {
fs.appendFile(log_file_path, formatForLogFile(error_msg));
} catch (e) {
}
} else {
console.error(error_msg);
}
}
},
/**
function clr (text, color) {
return process.stdout.isTTY ? ansi.format(text, color) : text
}
function clr (text, color) {
return process.stdout.isTTY ? ansi.format(text, color) : text
}
function clr (text, color) {
return process.stdout.isTTY ? ansi.format(text, color) : text
}
function clr (text, color) {
return process.stdout.isTTY ? ansi.format(text, color) : text
}
function clr (text, color) {
return process.stdout.isTTY ? ansi.format(text, color) : text
}
function clr (text, color) {
return process.stdout.isTTY ? ansi.format(text, color) : text
}