Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseHumanError ¶
BaseHumanError is the most basic version of HumanError, and simply embeds a static human error message inside it.
func NewHumanError ¶
func NewHumanError(message string, err error) *BaseHumanError
NewHumanError wraps err with a human-readable message.
func (*BaseHumanError) Error ¶
func (e *BaseHumanError) Error() string
Error returns the underlying error message.
func (*BaseHumanError) HumanError ¶
func (e *BaseHumanError) HumanError() string
HumanError returns the human-readable message.
type HumanError ¶
HumanError is an extension of the built-in error that also bundles a more human-readable variant of the message. I.e. where the normal error might say "failed to open file ...: $error message", HumanError would contain something more helpful like "failed while trying to read your configuration file. Make sure it exists and has correct permissions."
Click to show internal directories.
Click to hide internal directories.