MCPcopy Create free account
hub / github.com/github/gh-aw / formatCompilerErrorWithLocation

Function formatCompilerErrorWithLocation

pkg/parser/schema_compiler.go:458–471  ·  view source on GitHub ↗
(filePath string, line, column int, message string, contextLines []string)

Source from the content-addressed store, hash-verified

456}
457
458func formatCompilerErrorWithLocation(filePath string, line, column int, message string, contextLines []string) error {
459 compilerErr := console.CompilerError{
460 Position: console.ErrorPosition{
461 File: filePath,
462 Line: line,
463 Column: column,
464 },
465 Type: "error",
466 Message: message,
467 Context: contextLines,
468 }
469 formattedErr := console.FormatError(compilerErr)
470 return &FormattedParserError{formatted: formattedErr}
471}
472
473func buildFallbackSchemaValidationError(errorMsg, schemaJSON, filePath string, ctx frontmatterContextData) error {
474 message := rewriteAdditionalPropertiesError(errorMsg)

Calls 1

FormatErrorFunction · 0.92

Tested by

no test coverage detected