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

Method Error

pkg/sql/plpgsql/parser/lexer.go:608–613  ·  view source on GitHub ↗
(e string)

Source from the content-addressed store, hash-verified

606}
607
608func (l *lexer) Error(e string) {
609 e = strings.TrimPrefix(e, "syntax error: ") // we'll add it again below.
610 err := pgerror.WithCandidateCode(errors.Newf("%s", e), pgcode.Syntax)
611 lastTok := l.lastToken()
612 l.lastError = parser.PopulateErrorDetails(lastTok.id, lastTok.str, lastTok.pos, err, l.in)
613}
614
615// Unimplemented wraps Error, setting lastUnimplementedError.
616func (l *lexer) Unimplemented(feature string) {

Callers

nothing calls this directly

Calls 3

lastTokenMethod · 0.95
WithCandidateCodeFunction · 0.92
PopulateErrorDetailsFunction · 0.92

Tested by

no test coverage detected