errors

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConn              = NewDriverErr(exaerror.New("E-EGOD-1").Message("invalid connection"))
	ErrClosed                   = NewDriverErr(exaerror.New("E-EGOD-2").Message("connection was closed"))
	ErrMalformedData            = NewDriverErr(exaerror.New("E-EGOD-3").Message("malformed empty result"))
	ErrAutocommitEnabled        = NewDriverErr(exaerror.New("E-EGOD-4").Message("begin not working when autocommit is enabled"))
	ErrInvalidValuesCount       = NewDriverErr(exaerror.New("E-EGOD-5").Message("invalid value count for prepared status"))
	ErrNoLastInsertID           = NewDriverErr(exaerror.New("E-EGOD-6").Message("no LastInsertId available"))
	ErrNamedValuesNotSupported  = NewDriverErr(exaerror.New("E-EGOD-7").Message("named parameters not supported"))
	ErrLoggerNil                = NewDriverErr(exaerror.New("E-EGOD-8").Message("logger is nil"))
	ErrMissingServerCertificate = NewDriverErr(exaerror.New("E-EGOD-9").
								Message("server did not return certificates"))

	ErrInvalidProxyConn = NewDriverErr(exaerror.New("E-EGOD-26").
						Message("could not create proxy connection to import file"))
	ErrInvalidImportQuery = NewDriverErr(exaerror.New("E-EGOD-27").
							Message("could not parse import query"))
)

Various errors the driver might return. Can change between driver versions.

Functions

This section is empty.

Types

type DriverErr

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

DriverErr This type represents an error that can occur when working with a database connection.

func NewConnectionFailedError

func NewConnectionFailedError(url url.URL, err error) DriverErr

func NewCouldNotGetOsUser

func NewCouldNotGetOsUser(err error) DriverErr

func NewDriverErr

func NewDriverErr(error *exaerror.ExaError) DriverErr

func NewDriverErrWithCause added in v1.0.9

func NewDriverErrWithCause(error *exaerror.ExaError, cause error) DriverErr

func NewErrCertificateFingerprintMismatch

func NewErrCertificateFingerprintMismatch(actualFingerprint, expectedFingerprint string) DriverErr

func NewErrCouldNotAbort

func NewErrCouldNotAbort(rootCause error) DriverErr

func NewFileNotFound

func NewFileNotFound(path string) DriverErr

func NewInvalidArgType added in v1.0.8

func NewInvalidArgType(value interface{}, expectedType string) DriverErr

func NewInvalidConnectionString

func NewInvalidConnectionString(connectionString string) DriverErr

func NewInvalidConnectionStringHostOrPort

func NewInvalidConnectionStringHostOrPort(connectionString string) DriverErr

func NewInvalidConnectionStringInvalidIntParam

func NewInvalidConnectionStringInvalidIntParam(paramName, value string) DriverErr

func NewInvalidConnectionStringInvalidParameter

func NewInvalidConnectionStringInvalidParameter(parameter string) DriverErr

func NewInvalidConnectionStringInvalidPort

func NewInvalidConnectionStringInvalidPort(port string) DriverErr

func NewInvalidHostRangeLimits

func NewInvalidHostRangeLimits(host string) DriverErr

func NewJsonDecodingError

func NewJsonDecodingError(err error, message []byte) DriverErr

func NewMarshallingError

func NewMarshallingError(request interface{}, err error) DriverErr

func NewPasswordEncryptionError

func NewPasswordEncryptionError(err error) DriverErr

func NewReceivingError

func NewReceivingError(err error) DriverErr

func NewRequestSendingError

func NewRequestSendingError(err error) DriverErr

func NewSqlErr

func NewSqlErr(sqlCode string, msg string) DriverErr

func NewUncompressingError

func NewUncompressingError(err error) DriverErr

func NewWebsocketNotConnected added in v1.0.2

func NewWebsocketNotConnected(request interface{}) DriverErr

func (DriverErr) Error

func (e DriverErr) Error() string

Error converts the error to a string.

func (DriverErr) Is added in v1.0.9

func (e DriverErr) Is(target error) bool

func (DriverErr) Unwrap added in v1.0.9

func (e DriverErr) Unwrap() error

Jump to

Keyboard shortcuts

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