faultwrap

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package faultwrap adds a feature's safe message to a failure without hiding the framework classification its cause already carries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(err error) fault.Code

Code classifies err within errorgraph's bounds. Custom Unwrap/Is methods run in an isolated callback; a failing method conservatively yields Internal.

func Wrap

func Wrap(message string, err error) error

Wrap retains a fault.Error whose code is the first framework code found in err's bounded graph, so Overloaded, Invalid, Timeout, Closed, Conflict and Panicked causes keep their classification through feature boundaries. An unclassified deadline becomes Timeout; anything else, or an inspection that cannot complete, remains Internal. The cause stays available through errors.Is/errors.As and is never formatted. Marked diagnostics retain their immutable text. A nil err returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL