errors

package
v0.0.0-...-d61791e Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidUTF8Error

type InvalidUTF8Error struct {
	S string // the whole string value that caused the error
}

func (*InvalidUTF8Error) Error

func (e *InvalidUTF8Error) Error() string

type InvalidUnmarshalError

type InvalidUnmarshalError struct {
	Type reflect.Type
}

func (*InvalidUnmarshalError) Error

func (e *InvalidUnmarshalError) Error() string

type MarshalerError

type MarshalerError struct {
	Type reflect.Type
	Err  error
	// contains filtered or unexported fields
}

A MarshalerError represents an error from calling a MarshalJSON or MarshalText method.

func ErrMarshaler

func ErrMarshaler(typ reflect.Type, err error, msg string) *MarshalerError

func (*MarshalerError) Error

func (e *MarshalerError) Error() string

func (*MarshalerError) Unwrap

func (e *MarshalerError) Unwrap() error

Unwrap returns the underlying error.

type PathError

type PathError struct {
	// contains filtered or unexported fields
}

func ErrEmptyPath

func ErrEmptyPath() *PathError

func ErrInvalidPath

func ErrInvalidPath(msg string, args ...interface{}) *PathError

func (*PathError) Error

func (e *PathError) Error() string

type SyntaxError

type SyntaxError struct {
	Offset int64 // error occurred after reading Offset bytes
	// contains filtered or unexported fields
}

A SyntaxError is a description of a JSON syntax error.

func ErrExceededMaxDepth

func ErrExceededMaxDepth(c byte, cursor int64) *SyntaxError

func ErrExpected

func ErrExpected(msg string, cursor int64) *SyntaxError

func ErrInvalidBeginningOfValue

func ErrInvalidBeginningOfValue(c byte, cursor int64) *SyntaxError

func ErrInvalidCharacter

func ErrInvalidCharacter(c byte, context string, cursor int64) *SyntaxError

func ErrNotAtBeginningOfValue

func ErrNotAtBeginningOfValue(cursor int64) *SyntaxError

func ErrSyntax

func ErrSyntax(msg string, offset int64) *SyntaxError

func ErrUnexpectedEndOfJSON

func ErrUnexpectedEndOfJSON(msg string, cursor int64) *SyntaxError

func (*SyntaxError) Error

func (e *SyntaxError) Error() string

type UnmarshalFieldError deprecated

type UnmarshalFieldError struct {
	Key   string
	Type  reflect.Type
	Field reflect.StructField
}

An UnmarshalFieldError describes a JSON object key that led to an unexported (and therefore unwritable) struct field.

Deprecated: No longer used; kept for compatibility.

func (*UnmarshalFieldError) Error

func (e *UnmarshalFieldError) Error() string

type UnmarshalTypeError

type UnmarshalTypeError struct {
	Value  string       // description of JSON value - "bool", "array", "number -5"
	Type   reflect.Type // type of Go value it could not be assigned to
	Offset int64        // error occurred after reading Offset bytes
	Struct string       // name of the struct type containing the field
	Field  string       // the full path from root node to the field
}

An UnmarshalTypeError describes a JSON value that was not appropriate for a value of a specific Go type.

func (*UnmarshalTypeError) Error

func (e *UnmarshalTypeError) Error() string

type UnsupportedTypeError

type UnsupportedTypeError struct {
	Type reflect.Type
}

An UnsupportedTypeError is returned by Marshal when attempting to encode an unsupported value type.

func (*UnsupportedTypeError) Error

func (e *UnsupportedTypeError) Error() string

type UnsupportedValueError

type UnsupportedValueError struct {
	Value reflect.Value
	Str   string
}

func (*UnsupportedValueError) Error

func (e *UnsupportedValueError) Error() string

Jump to

Keyboard shortcuts

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