Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorInternalID = "errInternal" ErrorSystemID = "errSystem" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppError ¶
type AppError struct {
// contains filtered or unexported fields
}
type AppErrorFactory ¶
type AppErrorFactory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory(id string, kind ErrorKind, message string) *AppErrorFactory
func (*AppErrorFactory) Caller ¶
func (e *AppErrorFactory) Caller(skip int) *AppErrorFactory
func (*AppErrorFactory) New ¶
func (e *AppErrorFactory) New(args ...any) *AppError
type ErrorKind ¶
type ErrorKind int
const ( ErrorKindInternal ErrorKind = iota // внутренняя ошибка + traceID + call stack ErrorKindInternalNotice // внутреннее предупреждение, которое, в некоторых случаях, может стать поводом для реальной ошибки ErrorKindSystem // системная ошибка + traceID + call stack ErrorKindUser // пользовательская ошибка )
type FieldError ¶
type FieldError struct {
// contains filtered or unexported fields
}
func NewFieldError ¶ added in v0.4.0
func NewFieldError(id string, err error) *FieldError
func NewFieldErrorAppError ¶ added in v0.5.0
func NewFieldErrorAppError(id string, err *AppError) *FieldError
func NewFieldErrorMessage ¶ added in v0.5.0
func NewFieldErrorMessage(id string, message string) *FieldError
func (*FieldError) AppError ¶ added in v0.4.0
func (e *FieldError) AppError() *AppError
func (*FieldError) Error ¶ added in v0.4.0
func (e *FieldError) Error() string
func (*FieldError) ID ¶ added in v0.3.6
func (e *FieldError) ID() string
type FieldErrorList ¶
type FieldErrorList []*FieldError
func (FieldErrorList) Error ¶
func (l FieldErrorList) Error() string
Click to show internal directories.
Click to hide internal directories.