errors

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDecodeRequiredPointerType = xerrors.New("required pointer type value")
)

Functions

func ErrSyntax

func ErrSyntax(msg string, tk *token.Token) *syntaxError

ErrSyntax create syntax error instance with message and token

func Wrapf

func Wrapf(err error, msg string, args ...interface{}) error

Wrapf wrap error for stack trace

Types

type FormatErrorPrinter added in v1.9.6

type FormatErrorPrinter struct {
	xerrors.Printer
	Colored    bool
	InclSource bool
}

type PrettyPrinter

type PrettyPrinter interface {
	PrettyPrint(xerrors.Printer, bool, bool) error
}

type Sink

type Sink struct{ *bytes.Buffer }

func (*Sink) Detail

func (es *Sink) Detail() bool

func (*Sink) Print

func (es *Sink) Print(args ...interface{})

func (*Sink) Printf

func (es *Sink) Printf(f string, args ...interface{})

type TypeError added in v1.9.6

type TypeError struct {
	DstType         reflect.Type
	SrcType         reflect.Type
	StructFieldName *string
	Token           *token.Token
}

func (*TypeError) Error added in v1.9.6

func (e *TypeError) Error() string

func (*TypeError) FormatError added in v1.9.6

func (e *TypeError) FormatError(p xerrors.Printer) error

func (*TypeError) PrettyPrint added in v1.9.6

func (e *TypeError) PrettyPrint(p xerrors.Printer, colored, inclSource bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL