errors

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 7 Imported by: 33

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCaller

func GetCaller(cause error) (file string, line int, message string, err error)

func GetCode

func GetCode(err error) codes.Code

Get `codes.Code` of error and will return `codes.NoCode` if error doesn't have any code

func NewWithCode

func NewWithCode(code codes.Code, msg string, val ...any) error

Types

type App

type App struct {
	Code  codes.Code `json:"code,omitempty"`
	Title string     `json:"title,omitempty"`
	Body  string     `json:"body,omitempty"`
	// contains filtered or unexported fields
}

func Compile

func Compile(err error, lang language.Language) (int, App)

Compile returns an error and creates new `App` errors

func (*App) Error

func (a *App) Error() string

Jump to

Keyboard shortcuts

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