Documentation
¶
Index ¶
Constants ¶
View Source
const ( Info = iota Verbose Debug Trace )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Errorx ¶
type Errorx struct {
Code int `json:"error_code,omitempty"`
Message string `json:"error_message"`
Details []string `json:"error_details,omitempty"`
Cause error `json:"cause,omitempty"`
Stack Stack `json:"stack,omitempty"`
}
Errorx is a more feature rich implementation of error interface inspired by PostgreSQL error style guide
func (Errorx) Error ¶
Error returns a string representation of errorx. It includes at least error code and message. Error details and hint are provided depending on verbosity level set
func (Errorx) ErrorCode ¶
ErrorCode returns Errorx error code value. It's intended primarily to allow easy error comparison / matching
type StackFrame ¶
type StackFrame struct {
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
Function string `json:"function,omitempty"`
}
StackFrame represents a single frame of a stack trace
Click to show internal directories.
Click to hide internal directories.