errors2

package
v0.0.1-20230426-0001 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeReport

func BeforeReport(report func(e *define.GeneralError) bool)

BeforeReport decides to report or not the error to the error reporting manager

func DisableReport

func DisableReport()

func EnableReport

func EnableReport()

func IsOneOf

func IsOneOf(err error, targets ...error) bool

func New

func New(code int, message ...interface{}) error

New error

func NewCustom

func NewCustom(customError CustomError) error

func NewDefined

func NewDefined(definedErr *define.GeneralError) error

New error

Types

type CustomError

type CustomError struct {
	Code    int
	Message string
	// Log to application Logger
	LogToApp bool
	// Set instantly this error if you want to override the code & message
	GeneralError *define.GeneralError
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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