Documentation ¶
Index ¶
- func BadInputError(format string, args ...interface{}) error
- func DependencyFailed(name, typ string, err error) error
- func DoesNotMeetVersionRequirements(what string, expected, got int32) error
- func ExitWithCode(err error, code int) error
- func ExpectedError(format string, args ...interface{}) error
- func InternalError(format string, args ...interface{}) error
- func InvocationError(format string, args ...interface{}) error
- func IsDependencyFailed(err error) bool
- func IsExpected(err error) (string, bool)
- func New(format string, args ...interface{}) error
- func NoAccessToLimitedFeature() error
- func TransientError(format string, args ...interface{}) error
- func UsageError(runThis, toFixThis string, args ...interface{}) error
- func UserError(loc Location, format string, args ...interface{}) error
- func WithLogs(err error, readerF func() io.Reader) error
- func Wrap(loc Location, err error) error
- func Wrapf(loc Location, err error, whatFmt string, args ...interface{}) error
- type CodegenError
- type CodegenMultiError
- type DependencyFailedError
- type ErrWithLogs
- type ErrorCollector
- type ExitError
- type InternalErr
- type InvocationErr
- type Location
- type NsError
- type StackTracer
- type UsageErr
- type UserErr
- type VersionError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadInputError ¶
The input does match our expectations (e.g. missing bits, wrong version, etc).
func DependencyFailed ¶
func DoesNotMeetVersionRequirements ¶
This error means that Namespace does not meet the minimum version requirements.
func ExitWithCode ¶
This error is purely for wiring and ensures that Namespace exits with an appropriate exit code. The error content has to be output independently.
func ExpectedError ¶
This error is expected, e.g. a rebuild is required.
func InternalError ¶
Unexpected situation.
func InvocationError ¶
A call to a remote endpoint failed, perhaps due to a transient issue.
func IsDependencyFailed ¶
func IsExpected ¶
func New ¶
New returns a new error for a format specifier and optionals args with the stack trace at the point of invocation.
func NoAccessToLimitedFeature ¶
func NoAccessToLimitedFeature() error
func TransientError ¶
We failed but it may be due a transient issue.
func UsageError ¶
Configuration or system setup is not correct and requires user intervention.
Types ¶
type CodegenError ¶
CodegenError associates an error with a code generation phase and package.
func (*CodegenError) Error ¶
func (c *CodegenError) Error() string
func (*CodegenError) Unwrap ¶
func (c *CodegenError) Unwrap() error
type CodegenMultiError ¶
type CodegenMultiError struct { // accumulated CodenErrors. Errs []CodegenError // aggregates CodegenErrors by root error message. CommonErrs map[string]map[string]packages // contains errors not grouped in [commonerrs]. UniqGenErrs []CodegenError }
CodegenMultiError accumulates multiple CodegenError(s).
func (*CodegenMultiError) Error ¶
func (c *CodegenMultiError) Error() string
type DependencyFailedError ¶
func (*DependencyFailedError) Error ¶
func (d *DependencyFailedError) Error() string
func (*DependencyFailedError) Unwrap ¶
func (d *DependencyFailedError) Unwrap() error
type ErrWithLogs ¶
type ErrWithLogs struct { Err error ReaderF func() io.Reader // Returns reader with command's stderr output. }
func (*ErrWithLogs) Error ¶
func (e *ErrWithLogs) Error() string
type ErrorCollector ¶
type ErrorCollector struct {
// contains filtered or unexported fields
}
A thread-safe container for CodegenError that can generate a CodegenMultiError.
func (*ErrorCollector) Append ¶
func (c *ErrorCollector) Append(generr CodegenError)
func (*ErrorCollector) Error ¶
func (c *ErrorCollector) Error() error
Error returns a CodegenMultiError which aggregates all errors that were gathered. If no errors were collected, this method returns nil.
type InternalErr ¶
type InternalErr struct { NsError // contains filtered or unexported fields }
func (*InternalErr) Error ¶
func (e *InternalErr) Error() string
type InvocationErr ¶
type InvocationErr struct { NsError // contains filtered or unexported fields }
func (*InvocationErr) Error ¶
func (e *InvocationErr) Error() string
type NsError ¶
type NsError struct { Err error // contains filtered or unexported fields }
Wraps an error with a stack trace at the point of invocation.
func (*NsError) StackTrace ¶
func (f *NsError) StackTrace() stacktrace.StackTrace
Signature is compatible with pkg/errors and allows frameworks like Sentry to automatically extract the frame.
type StackTracer ¶
type StackTracer interface {
StackTrace() stacktrace.StackTrace
}
type VersionError ¶
func (*VersionError) Error ¶
func (e *VersionError) Error() string
Directories ¶
Path | Synopsis |
---|---|
Pretty-printing of various namespace errors.
|
Pretty-printing of various namespace errors. |