errors

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package errors contains application specific error specification

and resolution.

Index

Constants

This section is empty.

Variables

View Source
var As = errors.As
View Source
var ErrAlreadyExists = newError("already exists")
View Source
var ErrForbidden = newError("forbidden")
View Source
var ErrInternalError = newError("internal error")
View Source
var ErrInvalid = newError("invalid request")
View Source
var ErrRecordNotFound = newError("not found")
View Source
var ErrUnauthorized = newError("unauthorized")
View Source
var Is = errors.Is
View Source
var New = errors.New
View Source
var Unwrap = errors.Unwrap

Functions

func MailEnabled

func MailEnabled() bool

MailEnabled returns true if error mailing is enabled

func SendMail

func SendMail(ctx context.Context, err error, recipient string) error

SendMail sends error as mail to recipient. If recipient == "", send mail to default recipient from config file.

Types

type Error

type Error struct {
	ErrType string
	ErrMsg  string
	Err     error
	Stack   []byte
}

func (Error) Error

func (e Error) Error() string

func (Error) Is

func (e Error) Is(target error) bool

func (*Error) SetStack

func (e *Error) SetStack()

Jump to

Keyboard shortcuts

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