exception

package
v0.0.0-...-28e6f37 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ContainerCreateOrRunError = iota
	ContainerIdEmptyError
	ContainerIdExistsError
	FactoryNewError
	ContainerNotExistsError
	ContainerLoadError
	ContainerNotRunningError
	ContainerStillRunningError
	ParentProcessSignalError
	ParentProcessCreateError
	ParentProcessStartError
	ParentProcessWaitError
	ContainerRootCreateError
	PipeError
	EnvError
	InitializerCreateError
	InitializerRunError
	PrepareRootError
	MountError
	SyscallExecuteCmdError
	SignalError
	SysctlError
	LookPathError
	HostnameError
	RootfsError
	CgroupsError
	CmdStartError
	CmdWaitError
	// network
	NetworkError
	BridgeNetworkCreateError
	BridgeNetworkLoadError
	NetworkLinkNotFoundError
	NetworkLinkDeleteError
	InterfaceIPAndRouteSetError
	InterfaceSetUpError
	IPTablesSetError
	IPTablesDeleteError
	IPAMLoadError
	IPAMDumpError
	IPRunOutError
	IPReleaseError
	VethPairCreateError
	VethInitError
	VethMoveToNetNsError
	PortMappingsConfigError
	RouteAddError
	EnterNetNsError
	// image
	ImageServiceError
	ImageIdExistsError
	ImageIdNotExistsError
	ImageLoadError
	ImageCreateError
	ImageRepositoriesDumpError
	BundleCreateError
	SpecSaveError
	UnionFsError
	UnionFsMountError
	DnsError
	HostsError
	VolumeError
)

API util codes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	error
	// Returns the util code for this util.
	Code() ErrorCode
}

Error is the API util type.

func NewGenericError

func NewGenericError(err error, c ErrorCode) Error

func NewGenericErrorWithContext

func NewGenericErrorWithContext(err error, c ErrorCode, context string) Error

type ErrorCode

type ErrorCode int

ErrorCode is the API util code type.

func (ErrorCode) String

func (c ErrorCode) String() string

type GenericError

type GenericError struct {
	Timestamp time.Time
	ErrorCode ErrorCode
	Cause     error `json:"-"`
	Message   string
}

func (*GenericError) Code

func (e *GenericError) Code() ErrorCode

func (*GenericError) Error

func (e *GenericError) Error() string

Jump to

Keyboard shortcuts

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