Documentation
¶
Index ¶
- Constants
- func GetAccessForbiddenError(innerErrors ...error) model.AppError
- func GetBadRequestError(innerErrors ...error) model.AppError
- func GetCircuitBreakError(innerErrors ...error) model.AppError
- func GetCustomError(errorCode enum.Code, messageFormat string, parameters ...interface{}) model.AppError
- func GetDataCorruptionError(innerErrors ...error) model.AppError
- func GetGeneralFailureError(innerErrors ...error) model.AppError
- func GetInnermostErrors(err error) []error
- func GetInvalidOperation(innerErrors ...error) model.AppError
- func GetNotFoundError(innerErrors ...error) model.AppError
- func GetNotImplementedError(innerErrors ...error) model.AppError
- func GetOperationLockError(innerErrors ...error) model.AppError
- func GetUnauthorized(innerErrors ...error) model.AppError
- func Initialize() error
- func WrapError(innerErrors []error, errorCode enum.Code, messageFormat string, ...) model.AppError
- func WrapSimpleError(innerErrors []error, messageFormat string, parameters ...interface{}) model.AppError
Constants ¶
const ( ErrorPrintFormat string = "(%v)%v" // (Code)Message ErrorPointer string = " -> " ErrorHolderLeft string = "[ " ErrorHolderRight string = " ]" ErrorSeparator string = " | " ErrorMessageIndent string = " " )
These are print formatting related constants
Variables ¶
This section is empty.
Functions ¶
func GetAccessForbiddenError ¶
GetAccessForbiddenError creates an error related to AccessForbidden
func GetBadRequestError ¶
GetBadRequestError creates an error related to BadRequest
func GetCircuitBreakError ¶
GetCircuitBreakError creates an error related to CircuitBreak
func GetCustomError ¶ added in v1.2.7
func GetCustomError(errorCode enum.Code, messageFormat string, parameters ...interface{}) model.AppError
GetCustomError creates a customized error with given code and formatted message
func GetDataCorruptionError ¶
GetDataCorruptionError creates an error related to DataCorruption
func GetGeneralFailureError ¶
GetGeneralFailureError creates a generic error based on GeneralFailure
func GetInnermostErrors ¶
GetInnermostErrors finds the innermost error wrapped within the given error
func GetInvalidOperation ¶
GetInvalidOperation creates an error related to InvalidOperation
func GetNotFoundError ¶
GetNotFoundError creates an error related to NotFound
func GetNotImplementedError ¶
GetNotImplementedError creates an error related to NotImplemented
func GetOperationLockError ¶
GetOperationLockError creates an error related to OperationLock
func GetUnauthorized ¶ added in v1.2.5
GetUnauthorized creates an error related to Unauthorized
func Initialize ¶ added in v1.2.7
func Initialize() error
Initialize checks and validates the customization of AppErrors from consumer code
Types ¶
This section is empty.