erres

package module
v3.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: BSD-3-Clause Imports: 4 Imported by: 3

README

erres

Errors package

Documentation

Index

Constants

View Source
const (
	InternalServiceError ce = "internal service error"
	InvalidArgument      ce = "invalid argument"
	NilArgument          ce = "nil argument"
	NilReturnValue       ce = "nil return value"
	InvalidReturnValue   ce = "invalid return value"
	ConnectionError      ce = "connection error"
	NotSupported         ce = "not supported"
	ClosedChannel        ce = "closed channel"
	TypeMismatch         ce = "type mismatch"
	AccessDenied         ce = "access denied"
	NotFound             ce = "not found"
	AlreadyExist         ce = "already exist"
	FileError            ce = "file error"
	SerializationError   ce = "serialization error"
	DeserializationError ce = "deserialization error"
	JustError            ce = "error"
)

Variables

This section is empty.

Functions

func SetErrorFormat

func SetErrorFormat(t *template.Template) error

func SetTimeFormat

func SetTimeFormat(f string) error

Types

type CE

type CE = Consterror

func (CE) Error

func (i CE) Error() string

func (CE) Extend

func (i CE) Extend(skip int) *Error

Skip value tells how many func calls to skip before getting caller name

func (i CE) ExtendAndLink(skip int, err *Error) *Error

Extend method receiver, link it to err and return extended receiver

type Consterror

type Consterror string

type Error

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

func (Error) Error

func (e Error) Error() string

func (Error) IsRoot

func (e Error) IsRoot() bool

func (*Error) Last

func (e *Error) Last()
func (e *Error) Link(err CE) *Error

Extend and link err to method receiver and return pointer to an extended err

func (*Error) SetDescription

func (e *Error) SetDescription(description string) *Error

func (*Error) SetName

func (e *Error) SetName(name string) *Error

func (Error) String

func (e Error) String() string

Jump to

Keyboard shortcuts

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