define

package
v0.0.1-20220810-0001 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(err error) int

Code Return the Error code

func Is

func Is(err error) bool

func Msg

func Msg(err error) string

Msg Return the Error message

Types

type GeneralError

type GeneralError struct {
	Code             int
	Err              error  // This is the original defined error!
	AdditionalErrMsg string // This is additional, when we have an existing error, but we want to complete it with another message
}

func Err

func Err(code int, message ...interface{}) *GeneralError

Err -> This is used for defining at runtime errors!

func (*GeneralError) Error

func (e *GeneralError) Error() string

func (*GeneralError) SetAdditionalError

func (e *GeneralError) SetAdditionalError(additionalErrorMsg string)

Jump to

Keyboard shortcuts

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