errs

package
v0.0.0-...-3839eb7 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLocaleError

func IsLocaleError(err error) bool

func Wrap

func Wrap(err error, msg string) error

func WrapI18n

func WrapI18n(err error, key string, args ...any) error

Types

type JoinError

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

func Join

func Join(errs ...error) *JoinError

func (*JoinError) Err

func (j *JoinError) Err() error

func (*JoinError) Join

func (j *JoinError) Join(errs ...error) *JoinError

type LocaleError

type LocaleError struct {
	ErrorCode  int
	HttpStatus int
	LangCode   string
	Fb         string
	Err        error
}

LocaleError a response error wrap Err field

func NewError

func NewError() LocaleError

func NewI18nError

func NewI18nError(i18n string) LocaleError

func (LocaleError) Code

func (e LocaleError) Code(code int) LocaleError

func (LocaleError) Error

func (e LocaleError) Error() string

func (LocaleError) FallBack

func (e LocaleError) FallBack(fallback string) LocaleError

func (LocaleError) I18n

func (e LocaleError) I18n(langCode string) LocaleError

func (LocaleError) Status

func (e LocaleError) Status(status int) LocaleError

func (LocaleError) Wrap

func (e LocaleError) Wrap(err error) LocaleError

Jump to

Keyboard shortcuts

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