MCPcopy Create free account
hub / github.com/andywer/postguard / augmentQuerySyntaxError

Function augmentQuerySyntaxError

src/errors.ts:113–124  ·  view source on GitHub ↗
(
  error: Error,
  syntaxError: ParsingError,
  query: Query
)

Source from the content-addressed store, hash-verified

111}
112
113export function augmentQuerySyntaxError(
114 error: Error,
115 syntaxError: ParsingError,
116 query: Query
117): CodeError {
118 // tslint:disable-next-line prefer-object-spread
119 return Object.assign(error, {
120 name: "QuerySyntaxError",
121 location: mapToSourceLocation(query, syntaxError.cursorPosition - 1),
122 sourceFile: query.sourceFile
123 })
124}
125
126export function augmentValidationError(
127 error: Error,

Callers 1

parsePostgresQueryFunction · 0.90

Calls 1

mapToSourceLocationFunction · 0.85

Tested by

no test coverage detected