exception

package
v0.0.0-...-747ec1c Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Type    ErrorType
	Message string
}

func NewOtherError

func NewOtherError(msg string) AppError

func NewRepositoryError

func NewRepositoryError(msg string) AppError

func NewServiceError

func NewServiceError(msg string) AppError

func NewValidatorError

func NewValidatorError(msg string) AppError

func (AppError) Error

func (e AppError) Error() string

type ErrorType

type ErrorType int
const (
	ErrInternal ErrorType = iota
	ErrNotFound
	ErrInvalid
	ErrUnauthorized
	ErrForbidden
	ErrAlreadyExists
)
const (
	RepositoryError ErrorType = iota
	ValidatorError
	ServiceError
	OtherError
)

Jump to

Keyboard shortcuts

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