Versions in this module Expand all Collapse all v1 v1.0.0 Sep 15, 2025 Changes in this version + type ErrorBuilder struct + func NewBuilder(errorType ErrorType, message string) *ErrorBuilder + func (b *ErrorBuilder) Build() *ORMError + func (b *ErrorBuilder) Code(code string) *ErrorBuilder + func (b *ErrorBuilder) Context(key string, value interface{}) *ErrorBuilder + func (b *ErrorBuilder) Details(details string) *ErrorBuilder + func (b *ErrorBuilder) Field(field string) *ErrorBuilder + func (b *ErrorBuilder) Operation(operation string) *ErrorBuilder + func (b *ErrorBuilder) Query(query string, params ...interface{}) *ErrorBuilder + func (b *ErrorBuilder) Retry(retryable bool, retryCount int, retryDelay time.Duration) *ErrorBuilder + func (b *ErrorBuilder) Severity(severity ErrorSeverity) *ErrorBuilder + func (b *ErrorBuilder) Table(table string) *ErrorBuilder + func (b *ErrorBuilder) Value(value interface{}) *ErrorBuilder + type ErrorClassifier struct + func NewErrorClassifier() *ErrorClassifier + func (ec *ErrorClassifier) ClassifyError(err error, operation string) *ORMError + type ErrorHandler struct + func NewErrorHandler(maxRetries int, retryDelay time.Duration) *ErrorHandler + func (eh *ErrorHandler) HandleError(err error, operation string) *ORMError + func (eh *ErrorHandler) RetryWithContext(ctx context.Context, operation func() error, operationName string) error + type ErrorSeverity string + const ErrorSeverityCritical + const ErrorSeverityHigh + const ErrorSeverityLow + const ErrorSeverityMedium + type ErrorType string + const ErrorTypeAccessDenied + const ErrorTypeAssociation + const ErrorTypeCache + const ErrorTypeCacheInvalid + const ErrorTypeCacheMiss + const ErrorTypeCallback + const ErrorTypeConfig + const ErrorTypeConnection + const ErrorTypeConstraint + const ErrorTypeDeadlock + const ErrorTypeDuplicate + const ErrorTypeHook + const ErrorTypeInitialization + const ErrorTypeMigration + const ErrorTypeModel + const ErrorTypeNetwork + const ErrorTypeNotFound + const ErrorTypeQuery + const ErrorTypeRelationship + const ErrorTypeReplication + const ErrorTypeResource + const ErrorTypeSQLInjection + const ErrorTypeSecurity + const ErrorTypeSystem + const ErrorTypeTimeout + const ErrorTypeTransaction + const ErrorTypeUnknown + const ErrorTypeValidation + type ORMError struct + Cause error + Code string + Context map[string]interface{} + Details string + Field string + Message string + Operation string + Params []interface{} + Query string + RetryCount int + RetryDelay time.Duration + Retryable bool + Severity ErrorSeverity + Stack string + Table string + Timestamp time.Time + Type ErrorType + Value interface{} + func New(errorType ErrorType, message string) *ORMError + func NewConnectionError(message string) *ORMError + func NewConstraintError(message string) *ORMError + func NewDuplicateError(message string) *ORMError + func NewNotFoundError(message string) *ORMError + func NewQueryError(message string) *ORMError + func NewSecurityError(message string) *ORMError + func NewTimeoutError(message string) *ORMError + func NewTransactionError(message string) *ORMError + func NewValidationError(message string) *ORMError + func Wrap(err error, errorType ErrorType, message string) *ORMError + func (e *ORMError) AddContext(key string, value interface{}) + func (e *ORMError) Error() string + func (e *ORMError) GetContext() map[string]interface{} + func (e *ORMError) GetSeverity() ErrorSeverity + func (e *ORMError) GetType() ErrorType + func (e *ORMError) IsRetryable() bool + func (e *ORMError) Unwrap() error + func (e *ORMError) WithCode(code string) *ORMError + func (e *ORMError) WithDetails(details string) *ORMError + func (e *ORMError) WithField(field string) *ORMError + func (e *ORMError) WithOperation(operation string) *ORMError + func (e *ORMError) WithQuery(query string, params ...interface{}) *ORMError + func (e *ORMError) WithRetry(retryable bool, retryCount int, retryDelay time.Duration) *ORMError + func (e *ORMError) WithSeverity(severity ErrorSeverity) *ORMError + func (e *ORMError) WithTable(table string) *ORMError + func (e *ORMError) WithValue(value interface{}) *ORMError