errors

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrorDetails added in v1.0.6

func GetErrorDetails(err error) (file, line, funcName, message string)

GetErrorDetails we obtain the values of an error detail separately, if the parameter is nil we return all empty values, and if the passed error parameter is not in the desired pattern, we return only the filled message and the rest empty.

func Is

func Is(err, target error) bool

Is validate equal errors

func IsErrorDetail

func IsErrorDetail(err error) bool

IsErrorDetail check if the error is an errorDetail containing the pattern with file name, line, function name and message

func IsNot

func IsNot(err, target error) bool

IsNot validate not equal errors

func New

func New(message ...any) error

New error with space separated message values, if the message parameter is empty we return a nil value, otherwise returns normal value

func NewSkipCaller

func NewSkipCaller(skipCaller int, message ...any) error

NewSkipCaller error with message values separate per space and skipCaller, if the message parameter is empty we return a nil value, otherwise returns normal value

Types

This section is empty.

Jump to

Keyboard shortcuts

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