errors

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

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