clierror

package
v0.0.0-...-55ed90b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIError

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

func NewCLIError

func NewCLIError(err error, sanitizedMsg string) *CLIError

func (*CLIError) Error

func (e *CLIError) Error() string

func (*CLIError) SanitizedError

func (e *CLIError) SanitizedError() string

func (*CLIError) SanitizedStack

func (e *CLIError) SanitizedStack() string

type PanicError

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

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

func (*PanicError) Error

func (p *PanicError) Error() string

func (*PanicError) SanitizedError

func (p *PanicError) SanitizedError() string

func (*PanicError) SanitizedStack

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

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

func NewWarning(warning string) WarningError

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

func NewWarningF

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

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

func (WarningError) Error

func (w WarningError) Error() string

Jump to

Keyboard shortcuts

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