error

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

provides a custom error interface and exit codes to use on the elemental-cli

Index

Constants

View Source
const AlreadyInstalled = 57

Device already contains an install

View Source
const CalculateChecksum = 70

Error calculating checksum

View Source
const Cleanup = 41

Error occurred during cleanup

View Source
const CloseFile = 10

Error closing a file

View Source
const CloudInitRunStage = 65

Error encountered during cloud-init run-stage

View Source
const CommandRun = 11

Error running a command

View Source
const CopyData = 12

Error copying data

View Source
const CopyFile = 13

Error copying a file

View Source
const CopyFileImg = 77

Error occurred while copying the filesystem image and setting new labels

View Source
const CosignWrongFlags = 14

Wrong cosign flags used in cmd

View Source
const CreateDir = 15

Error creating a dir

View Source
const CreateFile = 16

Error creating a file

View Source
const CreateImgFromTree = 76

Error occurred while creating the OS filesystem image

View Source
const CreateTempDir = 17

Error creating a temporal dir

View Source
const DeactivatingDevices = 55

Error deactivating active devices

View Source
const DeployImage = 48

Error deploying image to file

View Source
const DeployImgTree = 75

Error occurred while preparing the image root tree

View Source
const DownloadFile = 53

Error during file download

View Source
const DumpSource = 18

Error dumping the source

View Source
const FormatPartitions = 60

Error occurred when formatting partitions

View Source
const GzipWriter = 19

Error creating a gzip writer

View Source
const HookAfterDisk = 80

Error occured on after-disk hook

View Source
const HookAfterDiskChroot = 81

Error occured on after-disk-chroot hook

View Source
const HookAfterInstall = 51

Error during after-install hook

View Source
const HookAfterInstallChroot = 52

Error during after-install-chroot hook

View Source
const HookAfterReset = 63

Error during after-reset hook

View Source
const HookAfterResetChroot = 62

Error during after-reset-chroot hook

View Source
const HookAfterUpgrade = 38

Error during after-upgrade hook

View Source
const HookAfterUpgradeChroot = 39

Error during after-upgrade-chroot hook

View Source
const HookBeforeDisk = 79

Error occured on before-disk hook

View Source
const HookBeforeInstall = 50

Error during before-install hook

View Source
const HookBeforeReset = 61

Error during before-reset hook

View Source
const HookBeforeUpgrade = 36

Error during before-upgrade hook

View Source
const HookBeforeUpgradeChroot = 37

Error during before-upgrade-chroot hook

View Source
const HookPostDisk = 82

Error occured on after-disk hook

View Source
const HookPostInstall = 74

Error occurred during post-install hook

View Source
const HookPostReset = 73

Error occurred during post-reset hook

View Source
const HookPostUpgrade = 72

Error occurred during post-upgrade hook

View Source
const IdentifySource = 20

Error trying to identify the source

View Source
const InstallGrub = 49

Error installing GRUB

View Source
const InvalidSize = 83

Error occured checking configured size is bigger than minimum required size

View Source
const InvalidTarget = 47

Error invalid device specified

View Source
const LabelImage = 44

Error occurred when labeling partition

View Source
const MKFSCall = 21

Error calling mkfs

View Source
const MountPartitions = 54

Error mounting partitions

View Source
const MountRecoveryPartition = 35

Error mounting recovery partition

View Source
const MountStatePartition = 34

Error mounting state partition

View Source
const MoveFile = 40

Error moving file

View Source
const NoPackagesForArch = 22

There is not packages for the given architecture

View Source
const NoSourceProvided = 68

No source was provided for the command

View Source
const OpenFile = 24

Error opening a file

View Source
const OutFileExists = 25

Output file already exists

View Source
const PartitioningDevice = 56

Error during device partitioning

View Source
const PowerOff = 43

Error occurred trying to shutdown

View Source
const ReadFile = 67

Error reading file

View Source
const ReadingBuildConfig = 26

Error reading the build config

View Source
const ReadingBuildDiskConfig = 27

Error reading the build-disk config

View Source
const ReadingInstallUpgradeFlags = 32

Error reading the install/upgrade flags

View Source
const ReadingRunConfig = 31

Error reading the run config

View Source
const ReadingSpecConfig = 33

Error reading the config for the command

View Source
const Reboot = 42

Error occurred trying to reboot

View Source
const RemoveFile = 69

Error removing a file

View Source
const RequiresRoot = 58

Command requires root privileges

View Source
const SelinuxRelabel = 46

Error occurred during selinux relabeling

View Source
const SetDefaultGrubEntry = 45

Error setting default grub entry

View Source
const SetGrubVariables = 78

Error setting persistent GRUB variables

View Source
const StatFile = 28

Error running stat on a file

View Source
const TarHeader = 29

Error creating a tar archive

View Source
const TruncateFile = 30

Error truncating a file

View Source
const Unknown int = 255

Unknown error

View Source
const UnmountImage = 71

Error occurred when unmounting image

View Source
const UnmountPartitions = 59

Error occurred when unmounting partitions

View Source
const UnpackImage = 66

Error unpacking image

View Source
const UnsupportedFlavor = 64

Unsupported flavor

Variables

This section is empty.

Functions

func New

func New(err string, code int) error

New generates an ElementalError from a string

func NewFromError

func NewFromError(err error, code int) error

NewFromError generates an ElementalError from an existing error, maintaining its error message

Types

type ElementalError

type ElementalError struct {
	// contains filtered or unexported fields
}

ElementalError is our custom error to pass around exit codes in the error

func (*ElementalError) Error

func (e *ElementalError) Error() string

func (*ElementalError) ExitCode

func (e *ElementalError) ExitCode() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL