xerrors

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package xerrors contains the utility for errors.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotImplement defines the function is not impelement
	ErrNotImplement = errors.New("NotImplement")

	// ErrNotFound defines the object is not found
	ErrNotFound = errors.New("ObjectNotFound")

	// ErrDuplicate defines the object is duplicate
	ErrDuplicate = errors.New("DuplicateObject")

	// ErrContinue defines the err can continue
	ErrContinue = errors.New("Continue")
)
View Source
var As = errors.As

As alias the errors.As

View Source
var Errorf = fmt.Errorf

Errorf alias the Errorf

View Source
var Is = errors.Is

Is alias the errors.Is

View Source
var New = errors.New

New alias the errors.New

Functions

func IsContinue

func IsContinue(err error) bool

IsContinue return true if the error is continue

func IsDuplicate

func IsDuplicate(err error) bool

IsDuplicate return true if the error is duplicate

func IsNotFound

func IsNotFound(err error) bool

IsNotFound return true if the error is object not found

func IsNotImplement

func IsNotImplement(err error) bool

IsNotImplement return true if the error is not implement

func WrapContinue

func WrapContinue(format string, args ...interface{}) error

WrapContinue return the Continue error

func WrapDuplicate

func WrapDuplicate(format string, args ...interface{}) error

WrapDuplicate return the wraped duplicate error

func WrapNotFound

func WrapNotFound(format string, args ...interface{}) error

WrapNotFound return the wraped not found error

func WrapNotImplement

func WrapNotImplement(format string, args ...interface{}) error

WrapNotImplement return the not implement error

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Wrapf alias the Wrapf

Types

This section is empty.

Jump to

Keyboard shortcuts

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