MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / Error

Method Error

pkg/sql/parser/recovery.go:39–44  ·  view source on GitHub ↗

Error implements the error interface and returns a human-readable description of the parse error with position information when available.

()

Source from the content-addressed store, hash-verified

37// Error implements the error interface and returns a human-readable description
38// of the parse error with position information when available.
39func (e *ParseError) Error() string {
40 if e.Line > 0 {
41 return fmt.Sprintf("parse error at line %d, column %d (token %d): %s", e.Line, e.Column, e.TokenIdx, e.Msg)
42 }
43 return fmt.Sprintf("parse error at token %d: %s", e.TokenIdx, e.Msg)
44}
45
46// Unwrap returns the underlying cause, enabling errors.Is and errors.As.
47func (e *ParseError) Unwrap() error {

Calls

no outgoing calls