Documentation ¶
Index ¶
- Constants
- func IsExistError(code string, name string, err error, searchingInDeep bool) (bool, error)
- func IsExistErrorByCode(code string, err error, searchingInDeep bool) (bool, error)
- func IsExistErrorByName(name string, err error, searchingInDeep bool) (bool, error)
- type Error
- func GetError(err error) (*Error, error)
- func NewError(code, name string, err error) *Error
- func NewErrorFromString(code, name, description string) *Error
- func WrapError(code, name string, err error, innerError error) *Error
- func WrapErrorFromString(code, name, description string, innerError error) *Error
- func (e *Error) Add(newError error, innerError error) *Error
- func (e *Error) AddFromString(code, name, description string, innerError error) *Error
- func (e *Error) Error() string
- func (e *Error) GetError() error
- func (e *Error) GetInnerError() *Error
- func (e *Error) ToMap(includInnerError bool) map[string]interface{}
- func (e *Error) ToString() string
Constants ¶
View Source
const ( JSON_CODE = `code` JSON_NAME = `name` JSON_DESCRIPTION = `description` JSON_INNER_ERROR = `innerError` )
Variables ¶
This section is empty.
Functions ¶
func IsExistError ¶
func IsExistErrorByCode ¶
Types ¶
type Error ¶
type Error struct { Code string `json:"code"` Name string `json:"name"` Description string `json:"description"` InnerError error `json:"innerError"` // contains filtered or unexported fields }
func NewErrorFromString ¶
func WrapErrorFromString ¶
func (*Error) AddFromString ¶
func (*Error) GetInnerError ¶
Click to show internal directories.
Click to hide internal directories.