colexecerror

package
v0.23.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchVectorizedRuntimeError

func CatchVectorizedRuntimeError(operation func()) (retErr error)

CatchVectorizedRuntimeError executes operation, catches a runtime error if it is coming from the vectorized engine, and returns it. If an error not related to the vectorized engine occurs, it is not recovered from.

func ExpectedError

func ExpectedError(err error)

ExpectedError panics with the error that is wrapped by notInternalError which will not be treated as internal error and will not have a printed out stack trace. This method should be called to propagate errors that the vectorized engine *expects* to occur.

func InternalError

func InternalError(err error)

InternalError simply panics with the provided object. It will always be caught and returned as internal error to the client with the corresponding stack trace. This method should be called to propagate errors that resulted in the vectorized engine being in an *unexpected* state.

func NonCatchablePanic

func NonCatchablePanic(object interface{})

NonCatchablePanic is the equivalent of Golang's 'panic' word that can be used in order to crash the goroutine. It could be used by the testing code within the vectorized engine to simulate a panic that occurs outside of the engine (and, thus, should not be caught).

Types

type StorageError

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

StorageError is an error that was created by a component below the sql stack, such as the network or storage layers. A StorageError will be bubbled up all the way past the SQL layer unchanged.

func NewStorageError

func NewStorageError(err error) *StorageError

NewStorageError returns a new storage error. This can be used to propagate an error through the exec subsystem unchanged.

func (*StorageError) Cause

func (s *StorageError) Cause() error

Cause implements the Causer interface.

Jump to

Keyboard shortcuts

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