Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChainableError ¶
ChainableError represents an error with a dependency chain. This is useful for tracking the full path of errors through a call stack.
func NewChainableError ¶
func NewChainableError(typ string, cause error) *ChainableError
NewChainableError creates a new chainable error with the given type and cause.
func (*ChainableError) Error ¶
func (e *ChainableError) Error() string
Error returns a formatted error message showing the full chain.
func (*ChainableError) Unwrap ¶
func (e *ChainableError) Unwrap() error
Unwrap returns the underlying cause for use with errors.Is/As.
func (*ChainableError) WithRequiredBy ¶
func (e *ChainableError) WithRequiredBy(requiredBy string) *ChainableError
WithRequiredBy adds the required-by context to a chainable error.
Click to show internal directories.
Click to hide internal directories.