qerrors

package
v0.0.0-...-f420c12 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: BSD-2-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message    string                 `json:"message"`
	Locations  []Location             `json:"locations,omitempty"`
	Path       []string               `json:"path,omitempty"`
	Extensions map[string]interface{} `json:"extensions,omitempty"`
	Rule       string                 `json:"-"`
	// contains filtered or unexported fields
}

func Errorf

func Errorf(format string, a ...interface{}) *Error

func New

func New(message string) *Error

func WrapError

func WrapError(err error, message string) *Error

func (*Error) Cause

func (err *Error) Cause() error

func (*Error) ClearStack

func (err *Error) ClearStack() *Error

func (*Error) Error

func (err *Error) Error() string

func (*Error) Format

func (w *Error) Format(s fmt.State, verb rune)

func (*Error) WithCause

func (e *Error) WithCause(err error) *Error

func (*Error) WithExtensions

func (e *Error) WithExtensions(details map[string]interface{}) *Error

func (*Error) WithLocations

func (e *Error) WithLocations(locations ...Location) *Error

func (*Error) WithPath

func (e *Error) WithPath(path ...string) *Error

func (*Error) WithRule

func (e *Error) WithRule(rule string) *Error

func (*Error) WithStack

func (err *Error) WithStack() *Error

type ErrorList

type ErrorList []*Error

func AppendErrors

func AppendErrors(items ErrorList, values ...error) ErrorList

func (ErrorList) Error

func (items ErrorList) Error() error

type Location

type Location struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

func (Location) Before

func (a Location) Before(b Location) bool

func (Location) String

func (l Location) String() string

Jump to

Keyboard shortcuts

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