errors

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UndefinedID errorIdentifier = iota
	ReadBodyErrID
	FileReadErrID
	FindQueryErrID
	ExecuteQueryErrID
	BeginTxErrID
	CommitTxErrID
	NoTxErrID
	ParseSqlErrID
	NotFoundQueryClientErrID
	RegisterQueryClientErrID
	BootstrapErrID
	WrongReadOnlySettingErrID
	StartTransactionErrID
	UnknownTransactionErrID
	TransactionClientSideErrID
	TransactionClientSidePanicErrID
)
View Source
const (
	Undefined namespace = iota
	SqlReader
	FileIO
	Query
	Sqlx
	Context
)

Variables

View Source
var (
	UndefinedErr                  = newErrorCode(UndefinedID, Undefined, "undefined error")
	ReadBodyErr                   = newErrorCode(ReadBodyErrID, FileIO, "fail to unmarshal xml file")
	FileReadErr                   = newErrorCode(FileReadErrID, FileIO, "fail to file read")
	FindQueryErr                  = newErrorCode(FindQueryErrID, Query, "fail to find the query")
	ParseQueryErr                 = newErrorCode(ParseSqlErrID, Query, "fail to parse query")
	ExecuteQueryErr               = newErrorCode(ExecuteQueryErrID, Sqlx, "fail to execute query")
	BeginTxErr                    = newErrorCode(BeginTxErrID, Sqlx, "fail to execute query")
	CommitTxErr                   = newErrorCode(CommitTxErrID, Sqlx, "fail to commit the transaction")
	NoTxErr                       = newErrorCode(NoTxErrID, Sqlx, "nil Tx pointer is not allowed")
	NotFoundQueryClientErr        = newErrorCode(NotFoundQueryClientErrID, Context, "fail to find query client by identifier")
	RegisterQueryClientErr        = newErrorCode(RegisterQueryClientErrID, Context, "fail to register query client to Context")
	BootstrapErr                  = newErrorCode(BootstrapErrID, Context, "fail to bootstrap application context")
	WrongReadOnlySettingErr       = newErrorCode(WrongReadOnlySettingErrID, Context, "fail to register query due to wrong readOnly setting ")
	StartTransactionErr           = newErrorCode(StartTransactionErrID, Query, "fail to start transaction")
	UnknownTransactionErr         = newErrorCode(UnknownTransactionErrID, Query, "unknown transaction error")
	TransactionClientSideErr      = newErrorCode(TransactionClientSideErrID, Query, "fail to transaction due to client side error")
	TransactionClientSidePanicErr = newErrorCode(TransactionClientSidePanicErrID, Query, "fail to transaction due to client side panic")
)

Functions

This section is empty.

Types

type Error

type Error interface {
	Code() *errorCode
	Msg() *string
	Args() *map[string]string
	error
}

func BuildBasicErr

func BuildBasicErr(code errorCode) Error

func BuildErrWithOriginal

func BuildErrWithOriginal(code errorCode, original error) Error

Jump to

Keyboard shortcuts

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