Documentation ¶
Overview ¶
Package errors defines error handling used by shed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct { // Kind is the category of error. Kind Kind // Reason is a human-readable message containing // the details of the error. Reason string // Op is the operation being performed, usually the // name of a function or method being invoked. Op Op // Err is the underlying error that triggered this one. // If no underlying error occurred, it will be nil. Err error }
Error represents a shed error.
type Kind ¶
type Kind uint8
Kind identifies the category of an error.
Kind is used to group errors based on how they can be actioned.
const ( Unspecified Kind = iota // Error that does not fall into any category. Invalid // Invalid operation on an item. NotInstalled // A tool needs to be installed for the operation to work. BadState // Shed is in a bad state, but it can be fixed. Internal // Internal error or inconsistency. IO // An OS level I/O error. Go // An error returned from the go command. )
Click to show internal directories.
Click to hide internal directories.