error

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is a struct to handle error

func New

func New(err error) *Error

New function used to create new error

func NewWithMetadata

func NewWithMetadata(err error, metadata map[string]interface{}) *Error

NewWithMetadata function used to create new error with metadata

func (*Error) Caller

func (e *Error) Caller() string

Caller function used to return caller of the error

func (*Error) Error

func (e *Error) Error() string

Error function used to return error message

func (*Error) GetMetadata

func (e *Error) GetMetadata(key string) interface{}

GetMetadata function used to get metadata of the error

func (*Error) SetMetadata

func (e *Error) SetMetadata(key string, value interface{})

SetMetadata function used to set metadata of the error

Jump to

Keyboard shortcuts

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