{"modulePath":"github.com/cockroachdb/cockroachdb-parser","version":"v0.25.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package colexecerror\n\n## Functions\n\n```go\nfunc CatchVectorizedRuntimeError(operation func()) (retErr error)\n```\nCatchVectorizedRuntimeError 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.\n\n```go\nfunc ExpectedError(err error)\n```\nExpectedError 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.\n\n```go\nfunc InternalError(err error)\n```\nInternalError panics with the error wrapped by internalError. 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.\n\n```go\nfunc NonCatchablePanic(object interface{})\n```\nNonCatchablePanic 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).\n\n```go\nfunc ProductionBehaviorForTests() func()\n```\nProductionBehaviorForTests reinstates the release-build behavior for CatchVectorizedRuntimeError, which is to catch \\*all\\* panics originating from within the vectorized execution engine, including runtime panics that are not wrapped in InternalError, ExpectedError, or StorageError. (Without calling this, in crdb\\_test builds, CatchVectorizedRuntimeError will only catch panics that are wrapped in InternalError, ExpectedError, or StorageError.)\n\n## Types\n\n```go\ntype StorageError struct {\n\t// contains filtered or unexported fields\n}\n```\nStorageError 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.\n\n```go\nfunc NewStorageError(err error) *StorageError\n```\nNewStorageError returns a new storage error. This can be used to propagate an error through the exec subsystem unchanged.\n\n```go\nfunc (s *StorageError) Cause() error\n```\n\n```go\nfunc (s *StorageError) Error() string\n```\n\n```go\nfunc (s *StorageError) Unwrap() error\n```\n\n","path":"github.com/cockroachdb/cockroachdb-parser/pkg/sql/colexecerror","name":"colexecerror","synopsis":"","isRedistributable":true}
