errors

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	As     = errors.As
	Is     = errors.Is
	Join   = errors.Join
	New    = errors.New
	Unwrap = errors.Unwrap
)

Functions

func ErrorMessage

func ErrorMessage(
	key string,
	event interface {
		RespondMessage(messageBuilder discord.MessageBuilder, opts ...rest.RequestOpt) error
		Locale() discord.Locale
	},
	opts ...Option,
) error

Types

type Error

type Error interface {
	error
	File() string
	Stack() string
	ID() uuid.UUID
}

func NewError

func NewError(err error) Error

func NewErrorWithMessage

func NewErrorWithMessage(err error, key string) Error

type ErrorWithMessage

type ErrorWithMessage interface {
	Key() string
}

type Option

type Option func(*config)

func WithDescription

func WithDescription(s string) Option

Jump to

Keyboard shortcuts

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