Documentation
¶
Overview ¶
Package errorcategory attaches stable categories to errors without changing their messages or unwrapping behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WrapperTypeName = reflect.TypeOf(categorizedError{}).String()
WrapperTypeName is the Go type name that reflection yields for the wrapper returned by With. Error reporters that derive a title from the concrete error type see this name rather than anything about the underlying failure, so they use it to recognize the wrapper and substitute the category instead.
Functions ¶
func UserInputErrorf ¶
UserInputErrorf formats an error categorized as UserInput.
Types ¶
type Categorized ¶
Categorized is implemented by errors with an explicit category.
Click to show internal directories.
Click to hide internal directories.