apperror

package
v0.0.0-...-2987294 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultServerErrorCode = iota
	DefaultClientErrorCode
	ValidationErrorCode
	NotFoundErrorCode
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

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

func NewAppError

func NewAppError(err error, code int, msg string, data map[string]interface{}) AppError

func NewServerError

func NewServerError(err error) AppError

func (AppError) AdditionalData

func (e AppError) AdditionalData() map[string]interface{}

func (AppError) DisplayMessage

func (e AppError) DisplayMessage() string

func (AppError) Error

func (e AppError) Error() string

func (AppError) GetCode

func (e AppError) GetCode() int

func (AppError) OriginalError

func (e AppError) OriginalError() error

func (AppError) OriginalMessage

func (e AppError) OriginalMessage() string

Jump to

Keyboard shortcuts

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