Documentation ¶
Index ¶
- func ContextWithNoReport(parent context.Context, no bool) context.Context
- func GetReportErrorFunc() reportErrorFunc
- func HasContext(err error) bool
- func HasStack(err error) bool
- func NoReportFromContext(ctx context.Context) bool
- func ReportError(ctx context.Context, err error)
- func SetErrorReporter(f reportErrorFunc)
- func WalkDeep(err error, visitor func(err error) bool) bool
- func WithContext(ctx context.Context, err error) error
- func WithContextWithDepth(ctx context.Context, err error, depth int) error
- func Wrap(err error, message string) error
- func Wrapf(err error, format string, args ...any) error
- type ContextTracer
- type StackTracer
- type WithIs
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithNoReport ¶ added in v0.7.0
func GetReportErrorFunc ¶
func GetReportErrorFunc() reportErrorFunc
func HasContext ¶
func NoReportFromContext ¶ added in v0.7.0
NoReportFromContext return false default.
func ReportError ¶
ReportError used to handle non-moerr Error
func SetErrorReporter ¶
func SetErrorReporter(f reportErrorFunc)
func WalkDeep ¶
WalkDeep does a depth-first traversal of all errors. The visitor function can return true to end the traversal early, otherwise false.
func WithContext ¶
WithContext annotates err with a stack info and a context, which should contain span info. At the mean time, it will call ReportError to store error info If err is nil, WithContext returns nil.
func WithContextWithDepth ¶
Types ¶
type ContextTracer ¶
ContextTracer retrieves the context.Context
func GetContextTracer ¶
func GetContextTracer(inErr error) ContextTracer
type StackTracer ¶
type StackTracer interface {
StackTrace() stack.StackTrace
}
StackTracer retrieves the StackTrace Generally you would want to use the GetStackTracer function to do that.
func GetStackTracer ¶
func GetStackTracer(inErr error) StackTracer
Click to show internal directories.
Click to hide internal directories.