errors

package
v0.0.0-...-77d2946 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = New(1, "not implemented.")
View Source
var ErrUnknown = New(0, "unknown error.")

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    uint   `json:"code" example:"0"`
	Message string `json:"message" example:"unknown error."`
	Cause   error  `json:"cause"`
}

func New

func New(code uint, message string) Error

func (Error) Error

func (m Error) Error() string

func (Error) Format

func (m Error) Format(param ...any) Error

func (Error) Is

func (m Error) Is(target error) bool

func (Error) Unwrap

func (m Error) Unwrap() error

func (Error) Wrap

func (m Error) Wrap(cause error) Error

Jump to

Keyboard shortcuts

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