h

package
v0.0.0-...-ce7c53e Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DbError = iota makes the error to be incremental, DbError = 0, AuthError=1, etc
	DbError = iota
	// RouterError = 1
	RouterError
	// ApiError = 2
	ApiError
	// BackupError
	BackupError
	// FileError = 3
	FileError
	// PlayerError = 4
	PlayerError
	// MatchError = 5
	MatchError
)

-------------------------------- ERRORS Errors const

Variables

This section is empty.

Functions

func HandleError

func HandleError(err Error) error

HandleError handles the different errors code to perform the required actions or just print the errors in a different way

func LogInfo

func LogInfo(msg string, args ...interface{})

LogInfo just prints the info

func LogOk

func LogOk(msg string, args ...interface{})

Types

type Error

type Error struct {
	Code    int
	Message string
	Stack   []uintptr
}

func New

func New(code int, message string) Error

func Newf

func Newf(code int, format string, args ...interface{}) Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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