errdefs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package errdefs has the public error types used by the API.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrStreamAlreadyClosed is invoked when trying to read a stream that has been closed or cancelled.
	ErrStreamAlreadyClosed = errors.New("stream has already been closed")
	// ErrClusterNotFound is invoked when trying to fetch information for a nonexistent cluster ID.
	ErrClusterNotFound = errors.New("cluster not found")
	// ErrUnImplemented is used for unimplemented features.
	ErrUnImplemented = errors.New("unimplemented")

	// ErrInvalidArgument specifies an unknown internal error has occurred.
	ErrInvalidArgument = errors.New("invalid/missing arguments")

	// ErrMissingDecryptionKey occurs if vizier sends encrypted table data without being asked to do so.
	ErrMissingDecryptionKey = errors.New("missing decryption key but got encrypted data")

	// ErrInternal specifies an unknown internal error has occurred.
	ErrInternal = errors.New("internal error")
	// ErrInternalMissingTableMetadata specifies an internal error has occurred where the table metadata is missing.
	ErrInternalMissingTableMetadata = createInternalError("missing table metadata")
	// ErrInternalDuplicateTableMetadata specifies an internal error has occurred where the table metadata has shown up multiple times.
	ErrInternalDuplicateTableMetadata = createInternalError("duplicate table metadata")
	// ErrInternalMismatchedType specifies an internal error has occurred where the table types don't match up between metadata and the various batches.
	ErrInternalMismatchedType = createInternalError("types don't match between metadata and row batch data")
	// ErrInternalUnImplementedType specifies an internal error has occurred where the types used by the Pixie API are not supported by this client version.
	// Most likely a client version update will fix the problem.
	ErrInternalUnImplementedType = createInternalError("unimplemented type")
	// ErrInternalDataAfterEOS got data after EOS.
	ErrInternalDataAfterEOS = createInternalError("got data after eos")

	// ErrCompilation is a generic PxL compilation error.
	ErrCompilation = errors.New("compilation error")
)

Functions

func IsCompilationError

func IsCompilationError(e error) bool

IsCompilationError returns true if the error is a result of PxlCompilationError.

func IsInternalError

func IsInternalError(e error) bool

IsInternalError checks to see if the error is an internal error.

func ParseStatus

func ParseStatus(s *vizierpb.Status) error

ParseStatus parses the status field. Returns an error if exists.

Types

type CompilerErrorDetails

type CompilerErrorDetails interface {
	Line() int64
	Column() int64
	Message() int64
}

CompilerErrorDetails is an interface to access error details from the compiler.

type CompilerMultiError

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

CompilerMultiError is an implementation of a multi-error for compiler messages.

func (CompilerMultiError) Error

func (c CompilerMultiError) Error() string

Error returns the string representation of the error.

func (CompilerMultiError) Errors

func (c CompilerMultiError) Errors() []error

Errors returns the list of underlying errors.

func (CompilerMultiError) Unwrap

func (c CompilerMultiError) Unwrap() error

Unwrap makes this error wrap a generic compilation error.

type MultiError

type MultiError interface {
	error
	Errors() []error
}

MultiError is an interface to allow access to groups of errors.

Directories

Path Synopsis
Package formatters contains implementations of table handles that can format data into tables, json, etc.
Package formatters contains implementations of table handles that can format data into tables, json, etc.

Jump to

Keyboard shortcuts

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