hzerrors

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryable

func IsRetryable(err error) bool

Types

type ClientError

type ClientError struct {
	WrappedErr error
	Err        error
	Message    string
}

func NewClientError

func NewClientError(msg string, wrapped, err error) *ClientError

func NewEOFError

func NewEOFError(msg string) *ClientError

func NewIOError

func NewIOError(msg string, err error) *ClientError

func NewIllegalArgumentError

func NewIllegalArgumentError(msg string, err error) *ClientError

func NewIllegalStateError added in v1.2.0

func NewIllegalStateError(msg string, err error) *ClientError

func NewInstanceNotActiveError

func NewInstanceNotActiveError(msg string) *ClientError

func NewInvalidConfigurationError added in v1.3.0

func NewInvalidConfigurationError(msg string, err error) *ClientError

func NewSQLError added in v1.2.0

func NewSQLError(msg string, err error) *ClientError

func NewSerializationError

func NewSerializationError(msg string, err error) *ClientError

func NewTargetDisconnectedError

func NewTargetDisconnectedError(msg string, err error) *ClientError

func (ClientError) Error

func (e ClientError) Error() string

func (ClientError) Is

func (e ClientError) Is(target error) bool

func (ClientError) IsRetryable

func (c ClientError) IsRetryable() bool

func (ClientError) Unwrap

func (e ClientError) Unwrap() error

func (ClientError) Wrap

func (e ClientError) Wrap(err error) error

type ServerError

type ServerError struct {
	ClassName      string
	Message        string
	CauseClassName string
	StackTrace     []StackTraceElement
	ErrorCode      int32
	CauseErrorCode int32
}

func NewServerError

func NewServerError(errorCode int32, className string, message string, stackTrace []StackTraceElement) *ServerError

func (*ServerError) Error

func (e *ServerError) Error() string

func (*ServerError) String

func (e *ServerError) String() string

type StackTraceElement

type StackTraceElement struct {
	// ClassName is the fully qualified name of the class containing the execution point represented by the stack trace element.
	ClassName string
	// MethodName is the name of the method containing the execution point represented by this stack trace element.
	MethodName string
	// FileName returns the name of the file containing the execution point represented by the stack trace element,
	FileName string
	// LineNumber returns the line number of the source line containing the execution point represented by this stack trace element,
	// or a negative number if this information is unavailable
	// A value of -2 indicates that the method containing the execution point is a native method.
	LineNumber int32
}

StackTraceElement contains stacktrace information for server side exception.

Jump to

Keyboard shortcuts

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