-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy patherrinterface.go
More file actions
44 lines (43 loc) · 1.31 KB
/
Copy patherrinterface.go
File metadata and controls
44 lines (43 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// 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
// Error is enriched version of normal error
// with tags and other methods
//
// Deprecated: Use errkit.ErrorX instead.
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
}