Versions in this module Expand all Collapse all v0 v0.19.4 Nov 1, 2026 Changes in this version + const ErrTypeAlreadyExists + const ErrTypeConcurrentOperation + const ErrTypeConfigError + const ErrTypeConfigInvalid + const ErrTypeConfigMissing + const ErrTypeConflict + const ErrTypeConnectionLost + const ErrTypeConnectionTimeout + const ErrTypeDataCorrupted + const ErrTypeDataNotFound + const ErrTypeDuplicateData + const ErrTypeEventProcessingFailed + const ErrTypeForbidden + const ErrTypeHandlerNotFound + const ErrTypeHandlerPanic + const ErrTypeHandlerTimeout + const ErrTypeInternal + const ErrTypeInvalidFilter + const ErrTypeInvalidFormat + const ErrTypeInvalidHandler + const ErrTypeInvalidMiddleware + const ErrTypeInvalidParam + const ErrTypeInvalidState + const ErrTypeMissingParam + const ErrTypeNetworkError + const ErrTypeNotFound + const ErrTypeNotImplemented + const ErrTypeQueueFull + const ErrTypeResourceExhausted + const ErrTypeTimeout + const ErrTypeUnauthorized + const ErrTypeUnavailable + const ErrTypeUnknownError + func Assert(condition bool, message string) error + func Is(err, target error) bool + func IsConcurrentOperationError(err error) bool + func IsEventProcessingFailedError(err error) bool + func IsHandlerNotFoundError(err error) bool + func IsHandlerPanicError(err error) bool + func IsHandlerTimeoutError(err error) bool + func IsInvalidFilterError(err error) bool + func IsInvalidHandlerError(err error) bool + func IsInvalidMiddlewareError(err error) bool + func IsInvalidParamError(err error) bool + func IsInvalidStateError(err error) bool + func IsNetworkError(err error) bool + func IsNotFoundError(err error) bool + func IsQueueFullError(err error) bool + func IsResourceExhaustedError(err error) bool + func IsTimeoutError(err error) bool + func IsType(err error, errType ErrorType) bool + func Must(err error) + func MustNot(condition bool, message string) + func New(message string) error + func NewAlreadyExistsError(resource string) error + func NewConcurrentOperationError(operation string) error + func NewConfigError(config string) error + func NewConfigInvalidError(config string) error + func NewConfigMissingError(config string) error + func NewConflictError(resource string) error + func NewConnectionLostError(target string) error + func NewConnectionTimeoutError(target string) error + func NewDataCorruptedError(data string) error + func NewDataNotFoundError(data string) error + func NewDuplicateDataError(data string) error + func NewEventProcessingFailedError(event string) error + func NewForbiddenError(reason string) error + func NewHandlerNotFoundError(handler string) error + func NewHandlerPanicError(handler string) error + func NewHandlerTimeoutError(handler string) error + func NewInternalError(message string) error + func NewInvalidFilterError(filter string) error + func NewInvalidFormatError(format string) error + func NewInvalidHandlerError(handler string) error + func NewInvalidMiddlewareError(middleware string) error + func NewInvalidParamError(param string) error + func NewInvalidStateError(state string) error + func NewMissingParamError(param string) error + func NewNetworkError(message string) error + func NewNotFoundError(resource string) error + func NewNotImplementedError(feature string) error + func NewQueueFullError(queue string) error + func NewResourceExhaustedError(resource string) error + func NewTimeoutError(operation string) error + func NewTypedError(errType ErrorType, msg string, args ...interface{}) error + func NewUnauthorizedError(reason string) error + func NewUnavailableError(service string) error + func Newf(format string, args ...interface{}) error + func PrintErrorMap() + func Recover(fn func()) (err error) + func RegisterError(errType ErrorType, msg string) + func ResetErrorMap() + func Unwrap(err error) error + func Wrap(err error, message string) error + func WrapError(message string, err ...error) error + type BaseError struct + Msg string + Type ErrorType + func NewBaseError(msg string, errTypes ...ErrorType) BaseError + func NewError(errType ErrorType, args ...interface{}) BaseError + func (e BaseError) Error() string + func (e BaseError) GetType() ErrorType + type CustomError struct + Code ErrorType + Details map[string]interface{} + func NewCustomError(code ErrorType, message string, details map[string]interface{}) *CustomError + func ToCustomError(err error, fallbackType ErrorType) *CustomError + func (e *CustomError) Error() string + func (e *CustomError) GetCode() ErrorType + func (e *CustomError) GetDetails() map[string]interface{} + type ErrorChain struct + func NewErrorChain() *ErrorChain + func (c *ErrorChain) AddError(err error) *ErrorChain + func (c *ErrorChain) AddErrorWithContext(err error, context map[string]interface{}) *ErrorChain + func (c *ErrorChain) Error() string + func (c *ErrorChain) GetErrors() []ErrorInfo + func (c *ErrorChain) GetLastError() *ErrorInfo + func (c *ErrorChain) HasErrors() bool + func (c *ErrorChain) String() string + type ErrorCollector struct + func NewErrorCollector() *ErrorCollector + func (c *ErrorCollector) Add(err error) + func (c *ErrorCollector) Error() string + func (c *ErrorCollector) GetErrors() []error + func (c *ErrorCollector) HasErrors() bool + type ErrorInfo struct + Context map[string]interface{} + Error error + Location string + Timestamp time.Time + type ErrorMapType map[ErrorType]string + func GetErrorMap() ErrorMapType + type ErrorType int + func ClassifyError(err error) ErrorType + type ErrorWithStack struct + Stack []uintptr + func NewErrorWithStack(message string) *ErrorWithStack + func (e *ErrorWithStack) Error() string + func (e *ErrorWithStack) GetStackTrace() string + func (e *ErrorWithStack) String() string + type RetryableError struct + CurrentRetry int + MaxRetries int + RetryAfter time.Duration + Retryable bool + func NewRetryableError(message string, maxRetries int, retryAfter time.Duration) *RetryableError + func (e *RetryableError) DisableRetry() + func (e *RetryableError) Error() string + func (e *RetryableError) GetRetryAfter() time.Duration + func (e *RetryableError) IncrementRetry() + func (e *RetryableError) ShouldRetry() bool + type ValidationError struct + Details map[string]interface{} + Field string + Rule string + Value interface{} + func NewValidationError(field, rule string, value interface{}, message string) *ValidationError + func (e *ValidationError) AddDetail(key string, value interface{}) + func (e *ValidationError) Error() string + type ValidationErrors struct + Errors []*ValidationError + func NewValidationErrors() *ValidationErrors + func (ve *ValidationErrors) Add(err *ValidationError) + func (ve *ValidationErrors) Error() string + func (ve *ValidationErrors) GetFieldErrors(field string) []*ValidationError + func (ve *ValidationErrors) HasErrors() bool