wperr

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENoError      string = ""
	EInternal     string = "E_INTERNAL"
	EFileNotFound string = "E_NOT_FOUND"
	EReadError    string = "E_READ_ERROR"
	ECopyError    string = "E_COPY_ERROR"
	EWriteError   string = "E_WRITE_ERROR"
)

application error codes

Variables

This section is empty.

Functions

func ErrorCode

func ErrorCode(err error) string

ErrorCode returns relevant error code

func ErrorContext

func ErrorContext(err error) string

ErrorContext returns relevant error context

func ErrorMessage

func ErrorMessage(err error) string

ErrorMessage returns relevant error message

Types

type E

type E struct {
	Code    string
	Message string
	Context string
	Op      string
	Err     error
}

E is our error type

func (*E) Error

func (e *E) Error() string

Error returns the string representation of the error message.

Jump to

Keyboard shortcuts

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