bolterr

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code uint8

Code defines the class of error.

const (
	// UnknownError is the default.
	UnknownError Code = iota
	// UserError is for errors caused by user input (e.g., bad flag value).
	// These messages are safe to show directly to the user.
	UserError
	// SystemError is for internal problems (e.g., can't write to a file).
	// The message is for logging; a generic message is shown to the user.
	SystemError
)

type Error

type Error struct {
	// The class of error.
	Code Code
	// The user-facing message.
	Message string
	// The underlying error for logging and debugging.
	Err error
}

Error is the standard error type for the application.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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