errors

package
v1.4.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 2 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(message string) *immuError

Types

type Code

type Code string
const (
	CodSuccessCompletion                             Code = "00000"
	CodInternalError                                 Code = "XX000"
	CodSqlclientUnableToEstablishSqlConnection       Code = "08001"
	CodSqlserverRejectedEstablishmentOfSqlconnection Code = "08004"
	CodProtocolViolation                             Code = "08P01"
	CodDataException                                 Code = "22000"
	CodInvalidParameterValue                         Code = "22023"
	CodUndefinedFunction                             Code = "42883"
	CodInvalidDatabaseName                           Code = "3F000"
	CodInvalidAuthorizationSpecification             Code = "28000"
	CodSqlserverRejectedEstablishmentOfSqlSession    Code = "08001"
	CodInvalidTransactionInitiation                  Code = "0B000"
	CodInFailedSqlTransaction                        Code = "25P02"
	CodIntegrityConstraintViolation                  Code = "23000"

	// Backwards compatibility
	CodNoSessionAuthDataProvided Code = CodInvalidAuthorizationSpecification
)

type ImmuError

type ImmuError interface {
	//Error return the message.
	Error() string
	//Cause is the inner error cause.
	Cause() string
	//Stack is present if immudb is running with LEVEL_INFO=debug
	Stack() string
	//Code is the immudb error code
	Code() Code
	//RetryDelay if present the error is retryable after N milliseconds
	RetryDelay() int32
}

ImmuError SDK immudb error interface. _, err = client.StreamSet(ctx, kvs) code := err.(errors.ImmuError).Code()) //errors.CodDataException

func FromError

func FromError(err error) ImmuError

Jump to

Keyboard shortcuts

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