Documentation ¶
Index ¶
- func As(err error, target interface{}) bool
- func ErrorPath(path, message string) error
- func ErrorPathf(path, msg string, args ...interface{}) error
- func ErrorQueryf(q *query.Query, format string, args ...interface{}) error
- func Errorf(format string, args ...interface{}) error
- func Errors(errs ...error) error
- func Is(err, target error) bool
- func New(message string) error
- func ReplacePath(err error, old, new string) error
- func WithNode(err error, node ast.Node) error
- func WithNodeAndColored(err error, node ast.Node, colored bool) error
- func WithPath(err error, path string) error
- func WithQuery(err error, q *query.Query) error
- func Wrap(err error, message string) error
- func WrapPath(err error, path, message string) error
- func WrapPathf(err error, path, message string, args ...interface{}) error
- func Wrapf(err error, format string, args ...interface{}) error
- type Error
- type MultiPathError
- type PathError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorPathf ¶
ErrorPathf create PathError instance with path and error message.
func ErrorQueryf ¶
ErrorQueryf create PathError instance by query.Query.
func ReplacePath ¶ added in v0.17.1
ReplacePath replaces the path if errors instance is PathError or MultiPathError.
func WithNode ¶ added in v0.16.0
WithNode set ast.Node to error if errors instance is PathError or MultiPathError.
func WithNodeAndColored ¶
WithNodeAndColored set ast.Node and colored to error if errors instance is PathError or MultiPathError.
func WithQuery ¶
WithQuery add path by query.Query to error if errors instance is PathError or MultiPathError.
func WrapPath ¶
WrapPath wrap error with path while paying attention to PathError and MultiPathError.
Types ¶
type Error ¶
type Error interface { Error() string // contains filtered or unexported methods }
Error represents interface for PathError and MultiPathError.
type MultiPathError ¶
MultiPathError represents multiple error with path.
func (*MultiPathError) Error ¶
func (e *MultiPathError) Error() string