errors

package
v0.0.0-...-6079644 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInspectImage int = 1 + iota
	ErrPullImage
	ErrScriptDownload
	ErrSaveArtifacts
	ErrBuild
	ErrSTIContainer
	ErrTarTimeout
	ErrWorkDir
	ErrDownload
	ErrURLHandler
	ErrDefaultScriptsURL
)

Common STI errors

Variables

This section is empty.

Functions

func NewBuildError

func NewBuildError(name string, err error) error

NewBuildError returns a new error which indicates there was a problem building the image

func NewContainerError

func NewContainerError(name string, code int, expected string) error

NewContainerError return a new error which indicates there was a problem invoking command inside container

func NewDefaultScriptsURLError

func NewDefaultScriptsURLError(err error) error

NewDefaultScriptsURLError return a new error which indicates there was a problem when trying to read STI_SCRIPTS_URL

func NewDownloadError

func NewDownloadError(url string, code int) error

NewDownloadError returns a new error which indicates there was a problem when downloading a file

func NewInspectImageError

func NewInspectImageError(name string, err error) error

NewInspectImageError returns a new error which indicates there was a problem inspecting the image

func NewPullImageError

func NewPullImageError(name string, err error) error

NewPullImageError returns a new error which indicates there was a problem pulling the image

func NewSaveArtifactsError

func NewSaveArtifactsError(name string, err error) error

NewSaveArtifactsError returns a new error which indicates there was a problem calling save-artifacts script

func NewScriptDownloadError

func NewScriptDownloadError(name api.Script, err error) error

NewScriptDownloadError returns a new error which indicates there was a problem downloading a script

func NewTarTimeoutError

func NewTarTimeoutError() error

NewTarTimeoutError returns a new error which indicates there was a problem when sending or receiving tar stream

func NewURLHandlerError

func NewURLHandlerError(url string) error

NewURLHandlerError returns a new error which indicates there was a problem when trying to read scripts URL

func NewWorkDirError

func NewWorkDirError(dir string, err error) error

NewWorkDirError returns a new error which indicates there was a problem when creating working directory

Types

type ContainerError

type ContainerError struct {
	Message       string
	ExpectedError string
	ErrorCode     int
	Suggestion    string
	ExitCode      int
}

ContainerError is an error returned when a container exits with a non-zero code. ExitCode contains the exit code from the container

func (ContainerError) Error

func (s ContainerError) Error() string

Error returns a string for the given error

type Error

type Error struct {
	Message    string
	Details    error
	ErrorCode  int
	Suggestion string
}

Error represents an error thrown during STI execution

func (Error) Error

func (s Error) Error() string

Error returns a string for a given error

Jump to

Keyboard shortcuts

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