MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / printFormattedError

Function printFormattedError

src/utils/errors.ts:500–515  ·  view source on GitHub ↗
(formatted: FormattedError)

Source from the content-addressed store, hash-verified

498
499// Print a formatted error as a chalk-styled string
500export function printFormattedError(formatted: FormattedError): string {
501 let output = `\n${chalk.red('✖')} ${chalk.bold.red(formatted.title)}\n`;
502 output += ` ${formatted.message}\n`;
503
504 if (formatted.helpUrl) {
505 output += `\n ${chalk.cyan('Help:')} ${chalk.underline(
506 formatted.helpUrl
507 )}\n`;
508 }
509
510 if (formatted.suggestion) {
511 output += `\n ${chalk.yellow('Suggestion:')} ${formatted.suggestion}\n`;
512 }
513
514 return output;
515}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…