Documentation ¶
Index ¶
- func Create(code ErrorCode, args ...interface{}) error
- func Get(code ErrorCode) error
- func IsOrContains(err error, inner error) bool
- func New(text string) error
- func NewStackedError(inner error, msg string) error
- func NewStackedErrorf(inner error, format string, a ...interface{}) error
- type ErrorCode
- type StackedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsOrContains ¶
IsOrContains indicates whether the err is the specified inner error, or the err is StackedError and contains the specified inner error.
func NewStackedError ¶
NewStackedError returns a StackedError with specified inner error and error msg.
func NewStackedErrorf ¶
NewStackedErrorf returns a StackedError with specified inner error and an error format specifier.
Types ¶
type ErrorCode ¶
type ErrorCode int
ErrorCode represents the error code type in scdo.
const ( // ErrDecrypt error when the passphrase is not right. ErrDecrypt ErrorCode // ErrEmptyAuthKey error when the auth key is empty. ErrEmptyAuthKey // ErrKeyVersionMismatch error when the auth key version does not match. ErrKeyVersionMismatch // ErrAddressLenInvalid is returned when the address length is invalid. ErrAddressLenInvalid // ErrPasswordRepeatMismatch is returned when the repeat password is not equal to the origin one. ErrPasswordRepeatMismatch )
type StackedError ¶
type StackedError struct {
// contains filtered or unexported fields
}
StackedError records errors that occurred in call stack.
func (*StackedError) Error ¶
func (err *StackedError) Error() string
Error implements the error interface.
Click to show internal directories.
Click to hide internal directories.