clierror

package
v0.10.36 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIError added in v0.10.8

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

func NewCLIError added in v0.10.8

func NewCLIError(err error, sanitizedMsg string) *CLIError

func (*CLIError) Error added in v0.10.8

func (e *CLIError) Error() string

func (*CLIError) SanitizedError added in v0.10.8

func (e *CLIError) SanitizedError() string

func (*CLIError) SanitizedStack added in v0.10.8

func (e *CLIError) SanitizedStack() string

type PanicError added in v0.10.8

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

PanicError is used to collect goroutine panics into an error interface so that we can do type assertion on err checking.

func NewPanicError added in v0.10.8

func NewPanicError(err error, stack []byte) *PanicError

func (*PanicError) Error added in v0.10.8

func (p *PanicError) Error() string

func (*PanicError) SanitizedError added in v0.10.8

func (p *PanicError) SanitizedError() string

func (*PanicError) SanitizedStack added in v0.10.8

func (p *PanicError) SanitizedStack() string

type SanitizedError

type SanitizedError interface {
	SanitizedError() string
	SanitizedStack() string
}

SanitizedError allows errors to be wrapped with a sanitized message for sending upstream

type WarningError added in v0.10.10

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

WarningError is an error that adhears to the error interface but is used to convey a non-critical path in the application code. WarningError messages should be considered safe to display to the user.

func NewWarning added in v0.10.10

func NewWarning(warning string) WarningError

NewWarning returns a new WarningError using warning as the error string.

func NewWarningF added in v0.10.10

func NewWarningF(warning string, args ...any) WarningError

NewWarningF returns a new WarningError using the warning as a formatted string.

func (WarningError) Error added in v0.10.10

func (w WarningError) Error() string

Jump to

Keyboard shortcuts

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