errors

package
v0.0.0-...-2b9378c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStackFrame

func GetStackFrame(beginningLine, lineCount int) (stackFrame string)

Types

type Error

type Error interface {
	Error() string
	Code() string
	Number() int
	Message() string
	InnerCause() string
	StackTrace() string
}

func New

func New(definition ErrorDef, params ...interface{}) Error

func NewWithCause

func NewWithCause(definition ErrorDef, innerCause error, params ...interface{}) Error

func Panic

func Panic(definition ErrorDef, params ...interface{}) Error

func PanicWithCause

func PanicWithCause(definition ErrorDef, innerCause error, params ...interface{}) Error

type ErrorDef

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

func DefineError

func DefineError(prefix string, number int, template string) ErrorDef

func (*ErrorDef) Code

func (definition *ErrorDef) Code() string

func (*ErrorDef) Equal

func (definition *ErrorDef) Equal(err error) bool

func (*ErrorDef) Template

func (definition *ErrorDef) Template() string

type StatusCode

type StatusCode struct {
	Error      ErrorDef
	StatusCode int
	ErrorCode  int
}

type StatusCodeList

type StatusCodeList map[string]StatusCode

Jump to

Keyboard shortcuts

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