errors

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	App = errorx.NewNamespace("app")

	HTTP          = App.NewType("http")
	HTTPRequest   = App.NewType("http-request")
	File          = App.NewType("file")
	FileOpen      = App.NewType("file-open")
	FileCreate    = App.NewType("file-create")
	FileRead      = App.NewType("file-read")
	FileWrite     = App.NewType("file-write")
	JSON          = App.NewType("json")
	JSONUnmarshal = App.NewType("json-unmarshal")
	JSONMarshal   = App.NewType("json-marshal")
	JSONEncode    = App.NewType("json-encode")
	JSONDecode    = App.NewType("json-decode")
	YAML          = App.NewType("yaml")

	Dependency = errorx.NewNamespace("dependency")

	PromptTui = Dependency.NewType("prompt-tui")

	User = errorx.NewNamespace("user")

	Reauthentication = User.NewType("reauthentication")
	NoFlagProvided   = User.NewType("no-flag")
	Input            = User.NewType("input")

	PlayBack = errorx.NewNamespace("playback")

	NoDevice = PlayBack.NewType("no-device")

	Jpeg = PlayBack.NewType("jpeg")
)

Functions

func Catch

func Catch(err error)

If the error is not nil: prints the error, and exits the program.

func Print

func Print(err error)

Prints the error even if it's nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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