Documentation
¶
Overview ¶
Package errorutil provides error handling utilities.
Deprecated: This package is deprecated and will be removed in a future version. Use github.com/projectdiscovery/utils/errkit instead, which provides better error handling with proper Go error chain support and optional stack traces.
Package errorutil provides error handling utilities.
Deprecated: This package is deprecated and will be removed in a future version. Use github.com/projectdiscovery/utils/errkit instead.
Package errorutil provides error handling utilities.
Deprecated: This package is deprecated and will be removed in a future version. Use github.com/projectdiscovery/utils/errkit instead.
Package errorutil provides error handling utilities.
Deprecated: This package is deprecated and will be removed in a future version. Use github.com/projectdiscovery/utils/errkit instead.
Package errorutil provides error handling utilities.
Deprecated: This package is deprecated and will be removed in a future version. Use github.com/projectdiscovery/utils/errkit instead.
Index ¶
- func IsAny(err error, errxx ...error) booldeprecated
- func IsTimeout(err error) booldeprecated
- type ErrCallbackdeprecated
- type ErrWithFmtdeprecated
- func NewWithFmt(fmt string) ErrWithFmtdeprecated
- func (e *ErrWithFmt) Error()deprecated
- func (e *ErrWithFmt) Msgf(args ...any) errordeprecated
- type Errordeprecated
- type ErrorLeveldeprecated
- func (l ErrorLevel) String() stringdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrCallback
deprecated
type ErrCallback func(level ErrorLevel, err string, tags ...string)
ErrCallback function to handle given error
Deprecated: Use errkit.ErrorX and its structured logging capabilities instead.
type ErrWithFmt
deprecated
added in
v0.0.7
type ErrWithFmt struct {
// contains filtered or unexported fields
}
ErrWithFmt is a simplified version of err holding a default format
Deprecated: Use errkit.ErrorX instead.
func NewWithFmt
deprecated
added in
v0.0.7
func NewWithFmt(fmt string) ErrWithFmt
NewWithFmt creates a new ErrWithFmt
Deprecated: Use errkit.New instead.
func (*ErrWithFmt) Error
deprecated
added in
v0.0.7
func (e *ErrWithFmt) Error()
Error implements error interface
Deprecated: Use errkit.ErrorX instead.
func (*ErrWithFmt) Msgf
deprecated
added in
v0.0.7
func (e *ErrWithFmt) Msgf(args ...any) error
Msgf wraps given message
Deprecated: Use errkit.ErrorX instead.
type Error
deprecated
type Error interface {
// WithTag assigns tag[s] to Error
//
// Deprecated: Use errkit.ErrorX instead.
WithTag(tag ...string) Error
// WithLevel assigns given ErrorLevel
//
// Deprecated: Use errkit.ErrorX instead.
WithLevel(level ErrorLevel) Error
// Error is interface method of 'error'
//
// Deprecated: Use errkit.ErrorX instead.
Error() string
// Unwrap returns the underlying error
//
// Deprecated: Use errkit.ErrorX instead.
Unwrap() error
// Wraps existing error with errors (skips if passed error is nil)
//
// Deprecated: Use errkit.ErrorX instead.
Wrap(err ...error) Error
// Msgf wraps error with given message
//
// Deprecated: Use errkit.ErrorX instead.
Msgf(format string, args ...any) Error
// Equal Checks Equality of errors
//
// Deprecated: Use errkit.ErrorX instead.
Equal(err ...error) bool
// WithCallback execute ErrCallback function when Error is triggered
//
// Deprecated: Use errkit.ErrorX instead.
WithCallback(handle ErrCallback) Error
}
Error is enriched version of normal error with tags and other methods
Deprecated: Use errkit.ErrorX instead.
func NewWithErr
deprecated
func NewWithTag
deprecated
func WrapfWithNil
deprecated
func WrapwithNil
deprecated
type ErrorLevel
deprecated
type ErrorLevel uint
ErrorLevel represents the severity level of an error
Deprecated: Use errkit.ErrKind instead.
const ( // Panic level error // // Deprecated: Use errkit.ErrKind instead. Panic ErrorLevel = iota // Fatal level error // // Deprecated: Use errkit.ErrKind instead. Fatal // Runtime level error (Default) // // Deprecated: Use errkit.ErrKind instead. Runtime )
func (ErrorLevel) String
deprecated
func (l ErrorLevel) String() string
String returns string representation of ErrorLevel
Deprecated: Use errkit.ErrKind instead.