Documentation ¶
Index ¶
- Variables
- func As(err error, target interface{}) bool
- func Detail(err error) string
- func Err(err error) error
- func HttpCodeOf(err error) (code int, desc string)
- func Is(err, target error) bool
- func New(msg string) error
- func Unwrap(err error) error
- type Causer
- type ErrorInfo
- func (r *ErrorInfo) Cause() error
- func (r *ErrorInfo) Detail(err error) *ErrorInfo
- func (r *ErrorInfo) Error() string
- func (r *ErrorInfo) ErrorCode() string
- func (r *ErrorInfo) ErrorDetail() string
- func (r *ErrorInfo) HttpCode() int
- func (r *ErrorInfo) Log(level int, reqId string) *ErrorInfo
- func (r *ErrorInfo) LogError(reqId string) *ErrorInfo
- func (r *ErrorInfo) LogMessage() string
- func (r *ErrorInfo) LogWarn(reqId string) *ErrorInfo
- func (r *ErrorInfo) Method() (cmd string, ok bool)
- func (r *ErrorInfo) Unwrap() error
- func (r *ErrorInfo) Warn() *ErrorInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpCodeOfUnEnum = func(err error) (code int, desc string) {
return 599, err.Error()
}
Functions ¶
func HttpCodeOf ¶
Types ¶
type ErrorInfo ¶
func InfoEx ¶
file and line tracing may have problems with go1.9, see related issue: https://github.com/golang/go/issues/22916
func (*ErrorInfo) ErrorDetail ¶
func (*ErrorInfo) LogMessage ¶
Click to show internal directories.
Click to hide internal directories.