errors

package
v0.0.0-...-2b5ea0c Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrMsgCannotBeNil   = "cannot be nil"
	ErrMsgCannotBeBlank = "cannot be blank"
)

Variables

View Source
var (
	InternalErrorType        = &InternalError{}
	InvalidArgumentErrorType = &InvalidArgumentError{}
	UnknownErrorType         = &UnknownError{}
	NotFoundErrorType        = &NotFoundError{}
)

Functions

This section is empty.

Types

type InternalError

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

func NewInternalError

func NewInternalError(msg string, err error) *InternalError

func (*InternalError) Error

func (e *InternalError) Error() string

Error allows baseError and any structs that embed it to satisfy the error interface.

func (*InternalError) Unwrap

func (e *InternalError) Unwrap() error

Unwrap allows baseError and any structs that embed it to be used with the error wrapping utilities introduced in go 1.13.

type InvalidArgumentError

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

func NewInvalidArgumentError

func NewInvalidArgumentError(arg, msg string) *InvalidArgumentError

func (*InvalidArgumentError) Error

func (e *InvalidArgumentError) Error() string

Error allows baseError and any structs that embed it to satisfy the error interface.

func (*InvalidArgumentError) Unwrap

func (e *InvalidArgumentError) Unwrap() error

Unwrap allows baseError and any structs that embed it to be used with the error wrapping utilities introduced in go 1.13.

type NotFoundError

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

func NewNotFoundError

func NewNotFoundError(msg string, err error) *NotFoundError

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error allows baseError and any structs that embed it to satisfy the error interface.

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

Unwrap allows baseError and any structs that embed it to be used with the error wrapping utilities introduced in go 1.13.

type UnknownError

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

func NewUnknownError

func NewUnknownError(msg string, err error) *UnknownError

func (*UnknownError) Error

func (e *UnknownError) Error() string

Error allows baseError and any structs that embed it to satisfy the error interface.

func (*UnknownError) Unwrap

func (e *UnknownError) Unwrap() error

Unwrap allows baseError and any structs that embed it to be used with the error wrapping utilities introduced in go 1.13.

Jump to

Keyboard shortcuts

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