errs

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: BSD-3-Clause Imports: 3 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAbort = NewExitError("Aborted.")

ErrAbort represents a situation where a user has been asked to perform an action but they've decided to abort.

View Source
var ErrTerminalRequired = NewExitError("This action must be performed in an attached terminal or all arguments must be passed.")

ErrTerminalRequired represents a situation where a connected terminal is required to perform the action.

Functions

func MultiError added in v0.29.0

func MultiError(errors ...error) cli.MultiError

MultiError loops over all given errors unpacks them and then creates a new MultiError for non-nil entries.

func NewErrorExitError

func NewErrorExitError(message string, err error) error

NewErrorExitError creates an ExitError with an appended error message

func NewExitError

func NewExitError(message string) error

NewExitError creates an ExitError with -1

func NewNotFound added in v0.30.0

func NewNotFound(name string) error

NewNotFound returns an error representing a NotFound error

func NewUsageExitError

func NewUsageExitError(message string, ctx *cli.Context) error

NewUsageExitError creates an ExitError with appended usage text

func ToError added in v0.30.0

func ToError(err error) error

ToError converts the given error into a cli.ExitError

Types

This section is empty.

Jump to

Keyboard shortcuts

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