Documentation
¶
Index ¶
- func As(err error, target interface{}) bool
- func Errorf(format string, args ...interface{}) error
- func Is(err, target error) bool
- func Join(errs ...error) error
- func New(message string, attrs ...ErrorAttribute) error
- func Report(ctx context.Context, err error)
- func ReportWithSeverity(ctx context.Context, err error, severity Severity)
- func SlogErr(err error) slog.Attr
- func Wrap(err error, attrs ...ErrorAttribute) error
- func WrapStackf(err error, format string, args ...interface{}) error
- func WrapWithStack(err error, stackattr ErrorAttribute, attrs ...ErrorAttribute) error
- type AttributeType
- type ErrorAttribute
- func Int(key string, value int) ErrorAttribute
- func Int64(key string, value int64) ErrorAttribute
- func KeyedStackf(key, format string, args ...interface{}) ErrorAttribute
- func Stackf(format string, args ...interface{}) ErrorAttribute
- func String(key, value string) ErrorAttribute
- func StringPtr(key string, value *string) ErrorAttribute
- func Stringf(key, format string, args ...interface{}) ErrorAttribute
- func Uint64(key string, value uint64) ErrorAttribute
- type ErrorAttributes
- type ErrorMessage
- type Severity
- type WrapConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(message string, attrs ...ErrorAttribute) error
func ReportWithSeverity ¶
func Wrap ¶
func Wrap(err error, attrs ...ErrorAttribute) error
func WrapStackf ¶
func WrapWithStack ¶
func WrapWithStack(err error, stackattr ErrorAttribute, attrs ...ErrorAttribute) error
Types ¶
type AttributeType ¶
type AttributeType uint8
const ( UnknownAttributeType AttributeType = iota StringAttributeType Uint64AttributeType Int64AttributeType StackAttributeType StringPtrAttributeType NoOpStackAttributeType )
type ErrorAttribute ¶
type ErrorAttribute struct {
// contains filtered or unexported fields
}
func Int ¶
func Int(key string, value int) ErrorAttribute
func Int64 ¶
func Int64(key string, value int64) ErrorAttribute
func KeyedStackf ¶
func KeyedStackf(key, format string, args ...interface{}) ErrorAttribute
func Stackf ¶
func Stackf(format string, args ...interface{}) ErrorAttribute
func String ¶
func String(key, value string) ErrorAttribute
func StringPtr ¶
func StringPtr(key string, value *string) ErrorAttribute
func Stringf ¶
func Stringf(key, format string, args ...interface{}) ErrorAttribute
func Uint64 ¶
func Uint64(key string, value uint64) ErrorAttribute
type ErrorAttributes ¶
type ErrorAttributes []ErrorAttribute
func (ErrorAttributes) ErrorAttributes ¶
func (attrs ErrorAttributes) ErrorAttributes() map[string]interface{}
func (ErrorAttributes) SlogAttrs ¶
func (attrs ErrorAttributes) SlogAttrs() []slog.Attr
type ErrorMessage ¶
type ErrorMessage string
func (ErrorMessage) Error ¶
func (e ErrorMessage) Error() string
type WrapConfig ¶
type WrapConfig struct {
Error error
Stack ErrorAttribute
Attributes []ErrorAttribute
}
Click to show internal directories.
Click to hide internal directories.