erres

package module
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: BSD-3-Clause Imports: 4 Imported by: 3

README

erres

Errors package

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetErrorFormat

func SetErrorFormat(t *template.Template) error

func SetTimeFormat

func SetTimeFormat(f string) error

Types

type Error

type Error string
const (
	USOE                               = UnacceptableStateOfExecution
	UnacceptableStateOfExecution Error = "unacceptable state of execution"
	InternalServiceError         Error = "internal service error"
	InvalidArgument              Error = "invalid argument"
	InvalidMethod                Error = "invalid method"
	NilArgument                  Error = "nil argument"
	NilReturnValue               Error = "nil return value"
	InvalidReturnValue           Error = "invalid return value"
	InvalidReturnType            Error = "invalid return type"
	ConnectionError              Error = "connection error"
	NotSupported                 Error = "not supported"
	Overdue                      Error = "overdue"
	Expired                      Error = "expired"
	ClosedChannel                Error = "closed channel"
	TypeMismatch                 Error = "type mismatch"
	AccessDenied                 Error = "access denied"
	NotFound                     Error = "not found"
	AlreadyExist                 Error = "already exist"
	FileError                    Error = "file error"
	SerializationError           Error = "serialization error"
	DeserializationError         Error = "deserialization error"
	ExternalError                Error = "external error"
	JustError                    Error = "error"
	UnknownError                 Error = "unknown error"
)

func (Error) Error

func (e Error) Error() string

func (Error) Extend

func (e Error) Extend(skip int) *extendedError

Extends Error to extendedError. The skip value tells how many function calls to skip before getting the function name

func (e Error) ExtendAndLink(skip int, err error) *extendedError

Extends Error to extendedError and links the given error as an ExternalError. The skip value tells how many function calls to skip before getting the function name

Jump to

Keyboard shortcuts

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