custom_error

package
v0.0.0-...-d5da7f7 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomError

type CustomError interface {
	fmt.Stringer
	error
	Unwrap() error
	GetError() error
	GetSubError() CustomError
	GetDetails() ErrorDetails
	GetType() ErrorType
}

func MakeError

func MakeError(err error) CustomError

func MakeErrorf

func MakeErrorf(format string, args ...interface{}) CustomError

func MakeTypedError

func MakeTypedError(errType ErrorType, err error) CustomError

func MakeTypedErrorf

func MakeTypedErrorf(errType ErrorType, format string, args ...interface{}) CustomError

func NewTypedError

func NewTypedError(errType ErrorType, subError CustomError, err error) CustomError

func NewTypedErrorf

func NewTypedErrorf(errType ErrorType, subError CustomError, format string, args ...interface{}) CustomError

func WrapError

func WrapError(subError CustomError, err error) CustomError

func WrapErrorf

func WrapErrorf(subError CustomError, format string, args ...interface{}) CustomError

type ErrorBuilder

type ErrorBuilder interface {
	MakeErrorf(format string, args ...interface{}) CustomError
	WrapErrorf(subError CustomError, format string, args ...interface{}) CustomError
}

func NewPrefixedErrorBuilder

func NewPrefixedErrorBuilder(prefix string) ErrorBuilder

type ErrorDetails

type ErrorDetails struct {
	Line int
	File string
}

type ErrorType

type ErrorType int

Jump to

Keyboard shortcuts

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