errorsx

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error, checks ...check) bool

func CheckErrorCode

func CheckErrorCode(errorCode errorCode.ErrorCode) check

func CheckInvalidUserInput

func CheckInvalidUserInput(parameterName string) check

func Convert

func Convert(err error, convertors ...convertor) error

func ConvertErrorCode

func ConvertErrorCode(errorCode errorCode.ErrorCode, errMessage string) convertor

func ConvertInvalidUserInput

func ConvertInvalidUserInput(parameterName string, errMessage string) convertor

func IsUserError

func IsUserError(err error) bool

Types

type UserError

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

func AsUserError

func AsUserError(err error) *UserError

func NewUserError

func NewUserError(message string, previous error) *UserError

func (*UserError) As

func (e *UserError) As(target interface{}) bool

func (*UserError) Error

func (e *UserError) Error() string

func (*UserError) Is

func (e *UserError) Is(target error) bool

func (*UserError) Unwrap

func (e *UserError) Unwrap() error

Jump to

Keyboard shortcuts

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