errors

package
v0.0.0-...-d125d34 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeInternalError = ErrorCode("InternalError")

	StatusInternalError = 500
)

Variables

This section is empty.

Functions

func Code

func Code(err error) string

Code returns the code of the root error, if available. Otherwise, returns ErrCodeInternalError.

func E

func E(op Op, args ...interface{}) error

func Message

func Message(err error) string

Message returns the message of the root error, if available.

func Status

func Status(err error) int

Status return the status of the root error, if available. Otherwise, returns the StatusInternalError.

Types

type Error

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

func (*Error) Error

func (e *Error) Error() string

Error returns the string representation of the error message.

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorCode

type ErrorCode string

type Op

type Op string

Jump to

Keyboard shortcuts

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