aspecterrors

package
v1.509.7 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK = 0

	// Bazel defines exit codes ~ 1-50: https://bazel.build/run/scripts#exit-codes
	// `bazel run` may propagate the exit code of the binary it runs.
	Failed                   = 1 // test/build/run build failure
	CLIError                 = 2 // bad cli args, bad env vars, etc.
	PartialOk                = 3 // build success, but: no tests found, query error, etc.
	NoTestsFound             = 4
	UnhandledOrInternalError = 37

	// Aspect CLI specific exit codes: 100 - ~200
	ConfigureFixed    = 110
	ConfigureDiff     = 111
	ConfigureNoConfig = 112
)

Variables

This section is empty.

Functions

func HandleError

func HandleError(err error)

Output information about the provided error and terminate the process. This should only be used in an application's main function or equivalent.

Types

type ErrorList

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

ErrorList is a linked list for errors.

func (*ErrorList) Errors

func (l *ErrorList) Errors() []error

Errors return a slice with all the elements in the linked list.

func (*ErrorList) Insert

func (l *ErrorList) Insert(err error)

Insert inserts a new error into the linked list.

type ExitError

type ExitError struct {
	Err      error
	ExitCode int
}

ExitError encapsulates an upstream error and an exit code. It is used by the aspect CLI main entrypoint to propagate meaningful exit error codes as the aspect CLI exit code.

func (*ExitError) Error

func (err *ExitError) Error() string

Error returns the call to the encapsulated error.Error().

Jump to

Keyboard shortcuts

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