Versions in this module Expand all Collapse all v0 v0.5.0 Nov 21, 2024 Changes in this version + var ErrForbidden = errors.New("forbidden") + var ErrInternal = errors.New("internal error") + var ErrNotFound = errors.New("not found") + var ErrUnauthorized = errors.New("unauthorized") + func GetLocalizedMessage(code int, lang string) string + func InitLogFile(logFilePath string) error + func LogError(err error) + func NotifyError(err error, recipientEmail string) + func RegisterErrorHandler(handler ErrorHandler) + func TriggerCustomErrorHandlers(err error) + func Unwrap(err error) error + func Wrap(err error, message string) error + type AggregateError struct + Errors []error + func NewAggregateError(errors []error) *AggregateError + func (e *AggregateError) Error() string + type CustomError struct + Code int + Context interface{} + Level ErrorLevel + Message string + Original error + func NewError(code int, message string, level ErrorLevel, context interface{}, ...) *CustomError + func (e *CustomError) Error() string + type ErrorHandler interface + HandleError func(err error) + type ErrorLevel int + const Critical + const Error + const Info + const Warning