errors

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Apache-2.0 Imports: 1 Imported by: 37

Documentation

Overview

Package errors defines the common errors

Package errors defines the common errors

Package errors defines the common errors

Package errors defines the common errors

Package errors defines the common errors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyExistsError added in v0.6.0

func IsAlreadyExistsError(err error) bool

IsAlreadyExistsError indicates whether the error is of type AlreadyExistsError err: The error to check whethe it is of AlreadyExistsError type Returns true if the given err is of type AlreadyExistsError, otherwise return false

func IsArgumentError added in v0.0.5

func IsArgumentError(err error) bool

IsArgumentError indicates whether the error is of type ArgumentError err: The error to check whethe it is of ArgumentError type Returns true if the given err is of type ArgumentError, otherwise return false

func IsArgumentNilError added in v0.0.5

func IsArgumentNilError(err error) bool

IsArgumentNilError indicates whether the error is of type ArgumentNilError err: The error to check whethe it is of ArgumentNilError type Returns true if the given err is of type ArgumentNilError, otherwise return false

func IsNotFoundError added in v0.6.0

func IsNotFoundError(err error) bool

IsNotFoundError indicates whether the error is of type NotFoundError err: The error to check whethe it is of NotFoundError type Returns true if the given err is of type NotFoundError, otherwise return false

func IsUnknownError added in v0.6.0

func IsUnknownError(err error) bool

IsUnknownError indicates whether the error is of type UnknownError err: The error to check whethe it is of UnknownError type Returns true if the given err is of type UnknownError, otherwise return false

func NewAlreadyExistsError added in v0.6.0

func NewAlreadyExistsError() error

NewAlreadyExistsError creates a new AlreadyExistsError error Returns the newly created error

func NewAlreadyExistsErrorWithError added in v0.6.0

func NewAlreadyExistsErrorWithError(err error) error

NewAlreadyExistsErrorWithError creates a new AlreadyExistsError error err: The error to wrap with the new created error Returns the newly created error

func NewArgumentError

func NewArgumentError(argumentName, message string) error

NewArgumentError creates a new ArgumentError error argumentName: The argument name message: The message to include Returns the newly created error

func NewArgumentErrorWithError added in v0.0.6

func NewArgumentErrorWithError(argumentName, message string, err error) error

NewArgumentErrorWithError creates a new ArgumentError error argumentName: The argument name message: The message to include err: The error to wrap with the new created error Returns the newly created error

func NewArgumentNilError

func NewArgumentNilError(argumentName, message string) error

NewArgumentNilError creates a new ArgumentNilError error argumentName: The argument name message: The message to include Returns the newly created error

func NewArgumentNilErrorWithError added in v0.0.6

func NewArgumentNilErrorWithError(argumentName, message string, err error) error

NewArgumentNilErrorWithError creates a new ArgumentNilError error argumentName: The argument name message: The message to include err: The error to wrap with the new created error Returns the newly created error

func NewNotFoundError added in v0.6.0

func NewNotFoundError() error

NewNotFoundError creates a new NotFoundError error Returns the newly created error

func NewNotFoundErrorWithError added in v0.6.0

func NewNotFoundErrorWithError(err error) error

NewNotFoundErrorWithError creates a new NotFoundError error err: The error to wrap with the new created error Returns the newly created error

func NewUnknownError added in v0.6.0

func NewUnknownError(message string) error

NewUnknownError creates a new UnknownError error Returns the newly created error

func NewUnknownErrorWithError added in v0.6.0

func NewUnknownErrorWithError(message string, err error) error

NewUnknownErrorWithError creates a new UnknownError error message: The additional message to include err: The error to wrap with the new created error Returns the newly created error

Types

type AlreadyExistsError added in v0.6.0

type AlreadyExistsError struct {
	Err error
}

AlreadyExistsError indicates that the with the given information already exists

func (AlreadyExistsError) Error added in v0.6.0

func (e AlreadyExistsError) Error() string

Error returns message for the AlreadyExistsError error type Returns the formatted error nessage

func (AlreadyExistsError) Unwrap added in v0.6.0

func (e AlreadyExistsError) Unwrap() error

Unwrap returns the err if provided through NewAlreadyExistsErrorWithError function, otherwise returns nil Returns the unwrapped error if previosuly provided through NewAlreadyExistsErrorWithError, otherwise return false

type ArgumentError

type ArgumentError struct {
	ArgumentName string
	Message      string
	Err          error
}

ArgumentError indicates that the provided input argument is invalid.

func (ArgumentError) Error

func (e ArgumentError) Error() string

Error returns message for the TenantAlreadyExistsError error type Returns the formatted error nessage

func (ArgumentError) Unwrap added in v0.0.5

func (e ArgumentError) Unwrap() error

Unwrap returns the err if provided through NewArgumentErrorWithError function, otherwise returns nil Returns the unwrapped error if previosuly provided through NewArgumentErrorWithError, otherwise return false

type ArgumentNilError

type ArgumentNilError struct {
	ArgumentName string
	Message      string
	Err          error
}

ArgumentNilError indicates that the provided input argument is invalid.

func (ArgumentNilError) Error

func (e ArgumentNilError) Error() string

Error returns message for the TenantAlreadyExistsError error type Returns the formatted error nessage

func (ArgumentNilError) Unwrap added in v0.0.5

func (e ArgumentNilError) Unwrap() error

Unwrap returns the err if provided through NewArgumentNilErrorWithError function, otherwise returns nil Returns the unwrapped error if previosuly provided through NewArgumentNilErrorWithError, otherwise return false

type NotFoundError added in v0.6.0

type NotFoundError struct {
	Err error
}

NotFoundError indicates that the with the given email address does not exist

func (NotFoundError) Error added in v0.6.0

func (e NotFoundError) Error() string

Error returns message for the NotFoundError error type Returns the formatted error nessage

func (NotFoundError) Unwrap added in v0.6.0

func (e NotFoundError) Unwrap() error

Unwrap returns the err if provided through NotFoundError function, otherwise returns nil Returns the unwrapped error if previosuly provided through NotFoundError, otherwise return false

type UnknownError added in v0.6.0

type UnknownError struct {
	Message string
	Err     error
}

UnknownError indicates that an unknown error has happened

func (UnknownError) Error added in v0.6.0

func (e UnknownError) Error() string

Error returns message for the UnknownError error type Returns the formatted error nessage

func (UnknownError) Unwrap added in v0.6.0

func (e UnknownError) Unwrap() error

Unwrap returns the err if provided through NewUnknownErrorWithError function, otherwise returns nil Returns the unwrapped error if previosuly provided through NewUnknownErrorWithError, otherwise return false

Jump to

Keyboard shortcuts

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