MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Error

Method Error

pkg/sql/parser/lexer.go:414–418  ·  view source on GitHub ↗
(e string)

Source from the content-addressed store, hash-verified

412}
413
414func (l *lexer) Error(e string) {
415 e = strings.TrimPrefix(e, "syntax error: ") // we'll add it again below.
416 l.lastError = pgerror.WithCandidateCode(errors.Newf("%s", e), pgcode.Syntax)
417 l.populateErrorDetails()
418}
419
420// PopulateErrorDetails properly wraps the "last error" field in the lexer.
421func PopulateErrorDetails(

Callers

nothing calls this directly

Calls 2

populateErrorDetailsMethod · 0.95
WithCandidateCodeFunction · 0.92

Tested by

no test coverage detected