MCPcopy
hub / github.com/di-sukharev/opencommit / printFormattedError

Function printFormattedError

out/cli.cjs:74621–74640  ·  view source on GitHub ↗
(formatted)

Source from the content-addressed store, hash-verified

74619 const errorMessage = error instanceof Error ? error.message : String(error);
74620 return {
74621 title: "Error",
74622 message: errorMessage,
74623 helpUrl: null,
74624 suggestion: "Run `oco setup` to reconfigure or check your settings."
74625 };
74626}
74627function printFormattedError(formatted) {
74628 let output = `
74629${source_default.red("\u2716")} ${source_default.bold.red(formatted.title)}
74630`;
74631 output += ` ${formatted.message}
74632`;
74633 if (formatted.helpUrl) {
74634 output += `
74635 ${source_default.cyan("Help:")} ${source_default.underline(
74636 formatted.helpUrl
74637 )}
74638`;
74639 }
74640 if (formatted.suggestion) {
74641 output += `
74642 ${source_default.yellow("Suggestion:")} ${formatted.suggestion}
74643`;

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…