Documentation
¶
Overview ¶
Package errors provides simple error handling for CCMD.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrAlreadyExists = errors.New("already exists") ErrInvalidInput = errors.New("invalid input") ErrGitOperation = errors.New("git operation failed") ErrFileOperation = errors.New("file operation failed") )
Sentinel errors for common error types
View Source
var DefaultHandler = &Handler{ logger: logger.GetDefault(), }
DefaultHandler is the default error handler instance
Functions ¶
func AlreadyExists ¶ added in v1.1.0
AlreadyExists creates an already exists error with context
func HandleFatal ¶
func HandleFatal(err error)
HandleFatal is a convenience function using the default handler
func InvalidInput ¶ added in v1.1.0
InvalidInput creates an invalid input error with context
Types ¶
Click to show internal directories.
Click to hide internal directories.