errors

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddParentArgument

func AddParentArgument(argument, parent string) string

func Append

func Append(left error, right error) error

func As

func As(err error, target any) bool

func Is

func Is(err, target error) bool

func MakeErrors

func MakeErrors(es ...error) error

func New

func New(text string) error

func NewSizeOutOfRange

func NewSizeOutOfRange(target string, min, max, size int64, real bool) error

func ReplaceParentArgument

func ReplaceParentArgument(argument, parent string) string

func Unwrap

func Unwrap(err error) error

Types

type ArgumentMissing

type ArgumentMissing struct {
	Arguments []string
}

func NewArgumentMissing

func NewArgumentMissing(arguments ...string) ArgumentMissing

func (ArgumentMissing) AddParentArgument

func (e ArgumentMissing) AddParentArgument(parent string)

func (ArgumentMissing) Error

func (e ArgumentMissing) Error() string

func (ArgumentMissing) ReplaceParentArgument

func (e ArgumentMissing) ReplaceParentArgument(parent string)

type ArgumentMissingOne

type ArgumentMissingOne struct {
	Arguments []string
}

func NewArgumentMissingOne

func NewArgumentMissingOne(arguments ...string) ArgumentMissingOne

func (ArgumentMissingOne) AddParentArgument

func (e ArgumentMissingOne) AddParentArgument(parent string)

func (ArgumentMissingOne) Error

func (e ArgumentMissingOne) Error() string

func (ArgumentMissingOne) ReplaceParentArgument

func (e ArgumentMissingOne) ReplaceParentArgument(parent string)

type Err

type Err struct {
	Err error
}

func Wrap

func Wrap(err error) Err

func (Err) Error

func (e Err) Error() string

func (Err) Unwrap

func (e Err) Unwrap() error

type ErrorGroup

type ErrorGroup interface {
	Errors() []error
}

type Errors

type Errors []error

func (Errors) Append

func (es Errors) Append(err error) Errors

func (Errors) Error

func (es Errors) Error() string

func (Errors) Errors

func (es Errors) Errors() []error

func (Errors) ToError

func (es Errors) ToError() error

type Exist

type Exist struct {
	Target string
}

func NewExist

func NewExist(target string) Exist

func (Exist) Error

func (e Exist) Error() string

type HttpResponseError

type HttpResponseError struct {
	Code int
	Msg  string
}

func (*HttpResponseError) Error

func (e *HttpResponseError) Error() string

type InvalidArgument

type InvalidArgument struct {
	Argument string
	Err      error
}

func NewInvalidArgument

func NewInvalidArgument(argument string, err error) *InvalidArgument

func (*InvalidArgument) AddParentArgument

func (e *InvalidArgument) AddParentArgument(parent string)

func (*InvalidArgument) Error

func (e *InvalidArgument) Error() string

func (*InvalidArgument) ReplaceParentArgument

func (e *InvalidArgument) ReplaceParentArgument(parent string)

type InvalidModify

type InvalidModify struct {
	Target string
}

func (*InvalidModify) Error

func (e *InvalidModify) Error() string

type InvalidOperation

type InvalidOperation struct {
	Operation string
}

func NewInvalidOperation

func NewInvalidOperation(operation string) InvalidOperation

func (InvalidOperation) Error

func (e InvalidOperation) Error() string

type NotAvailable

type NotAvailable struct {
	Target string
}

func NewNotAvailable

func NewNotAvailable(target string) NotAvailable

func (NotAvailable) Error

func (e NotAvailable) Error() string

type NotFound

type NotFound struct {
	Target any
}

func NewNotFound

func NewNotFound(target any) NotFound

func (NotFound) Error

func (e NotFound) Error() string

type SizeOutOfRange

type SizeOutOfRange struct {
	Target   string
	MinSize  int64
	MaxSize  int64
	Size     int64
	RealSize bool
}

func (*SizeOutOfRange) Error

func (e *SizeOutOfRange) Error() string

type StringError

type StringError string

func (StringError) Error

func (s StringError) Error() string

type TaskFull

type TaskFull struct {
	Action  string
	MaxTask int
}

func (*TaskFull) Error

func (e *TaskFull) Error() string

Jump to

Keyboard shortcuts

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