Documentation
¶
Index ¶
- func WrapWithErr(oldErr, newErr error) error
- func WrapWithFrame(oldErr error) error
- type Error
- func (e *Error) Code() int
- func (e *Error) Component() string
- func (e Error) DumpStack() []string
- func (e Error) DumpStackWithID(requestID string) []string
- func (e *Error) Error() string
- func (e *Error) JSON() ([]byte, error)
- func (e *Error) Message() string
- func (e *Error) Unwrap() error
- func (e *Error) WithCode(code int) *Error
- func (e *Error) WithComponent(component string) *Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapWithErr ¶
func WrapWithFrame ¶
Types ¶
type Error ¶
type Error struct { Err string `json:"message,omitempty"` ErrCode int `json:"code,omitempty"` Comp string `json:"component,omitempty"` File string `json:"file,omitempty"` Line int `json:"line,omitempty"` Cause error }
Error is an extended error main struct
func NewErrorWithErr ¶
NewErrorWithErr creates Error type with error in parameter
func NewErrorWithMessage ¶
NewErrorWithMessage creates Error type with string in parameter
func (Error) DumpStackWithID ¶
func (*Error) WithComponent ¶
WithComponent sets component name of Error
Click to show internal directories.
Click to hide internal directories.