clair: github.com/coreos/clair/pkg/commonerr Index | Files

package commonerr

import "github.com/coreos/clair/pkg/commonerr"

Package commonerr defines reusable error types common throughout the Clair codebase.

Index

Package Files

errors.go

Variables

var (
    // ErrFilesystem occurs when a filesystem interaction fails.
    ErrFilesystem = errors.New("something went wrong when interacting with the fs")

    // ErrCouldNotDownload occurs when a download fails.
    ErrCouldNotDownload = errors.New("could not download requested resource")

    // ErrNotFound occurs when a resource could not be found.
    ErrNotFound = errors.New("the resource cannot be found")

    // ErrCouldNotParse is returned when a fetcher fails to parse the update data.
    ErrCouldNotParse = errors.New("updater/fetchers: could not parse")
)

func CombineErrors Uses

func CombineErrors(errs ...error) error

CombineErrors merges a slice of errors into one separated by ";". If all errors are nil, return nil.

func NewBadRequestError Uses

func NewBadRequestError(message string) error

NewBadRequestError instantiates a ErrBadRequest with the specified message.

type ErrBadRequest Uses

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

ErrBadRequest occurs when a method has been passed an inappropriate argument.

func (*ErrBadRequest) Error Uses

func (e *ErrBadRequest) Error() string

Package commonerr imports 3 packages (graph) and is imported by 57 packages. Updated 2017-09-23. Refresh now. Tools for package owners.