Documentation
¶
Overview ¶
Package errorgraph bounds framework-owned inspection of wrapped/joined errors. Callers isolate custom Is/As/Unwrap methods and retain callback ownership.
Index ¶
- func As[T error](err error) (value T, found, complete bool)
- func AsShallow[T error](err error) (T, bool)
- func AsTarget(err error, target any) bool
- func AsTargetShallow(err error, target any) bool
- func Has[T error](err error) bool
- func Is(err, target error) bool
- func Matches(err, target error) bool
- func Walk(err error, visit func(error) bool) bool
- func WalkPruned(err error, visit func(error) bool, prune func(error) bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func As ¶
As returns the first assignable/custom-As match in depth-first order. Complete distinguishes an absent match from an exhausted traversal. A found value ends the search before unwrapping it, including when the matched value is typed nil.
func AsShallow ¶
AsShallow performs the assignability/custom-As step of errors.As without unwrapping. T must implement error. Use inside Walk to bound the whole search.
func AsTargetShallow ¶
AsTargetShallow performs one assignability/custom-As step for a validated errors.As target. Framework adapters may expose only their current node while their bounded children retain the caller's shared traversal and pruning rules.
func Has ¶
Has searches for an assignable/custom-As match within Walk's shared bounds. An incomplete search establishes no match.
func Is ¶
Is searches for equality or a custom Is match within Walk's shared bounds. Exhaustion means no match was established. Callers retain isolation and must treat an unmatched non-nil error as a failure, not evidence of successful work.
func Matches ¶
Matches performs the equality/custom-Is step of errors.Is without unwrapping. Use inside Walk to retain one shared traversal budget across classifications.
Types ¶
This section is empty.