Documentation ¶
Overview ¶
Package errors contains errors used by the installer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(errCode InstallerErrorCode, err error) error
Wrap wraps the given error with an installer error. If the given error is already an installer error, it is not wrapped and left as it is. Only the deepest InstallerError remains.
Types ¶
type InstallerError ¶
type InstallerError struct {
// contains filtered or unexported fields
}
InstallerError is an error type used by the installer.
func From ¶
func From(err error) *InstallerError
From returns a new InstallerError from the given error.
func (InstallerError) Code ¶
func (e InstallerError) Code() InstallerErrorCode
Code returns the error code of the installer error.
func (InstallerError) Error ¶
func (e InstallerError) Error() string
Error returns the error message.
func (InstallerError) Is ¶
func (e InstallerError) Is(target error) bool
Is implements the Is method of the errors.Is interface.
func (InstallerError) Unwrap ¶
func (e InstallerError) Unwrap() error
Unwrap returns the wrapped error.
type InstallerErrorCode ¶
type InstallerErrorCode uint64
InstallerErrorCode is an error code used by the installer.
const ( // ErrInstallFailed is the code for an install failure. ErrInstallFailed InstallerErrorCode // ErrDownloadFailed is the code for a download failure. ErrDownloadFailed // ErrInvalidHash is the code for an invalid hash. ErrInvalidHash // ErrInvalidState is the code for an invalid state. ErrInvalidState // ErrPackageNotFound is the code for a package not found. ErrPackageNotFound // ErrUpdateExperimentFailed is the code for an update experiment failure. ErrUpdateExperimentFailed )
Click to show internal directories.
Click to hide internal directories.