Versions in this module Expand all Collapse all v1 v1.6.0 Mar 21, 2024 v1.5.0 Mar 21, 2024 v1.4.0 Mar 14, 2024 v1.3.0 Mar 14, 2024 v1.1.0 Apr 17, 2021 v1.0.5 Mar 21, 2024 Changes in this version + func GetStack(e error) []string type Error + func (e Error) Stack() []string v1.0.0 Apr 17, 2021 Changes in this version + const LcauseBy + const LdateTime + const Llongfile + const Size + var DefaultHandler = func(e error, context map[string]interface{}) + func GenerateKeyword(e error) string + func GroupErrors(errors ...error) error + func IsError(src error, dest error) (string, bool) + func JSON(e error, context map[string]interface{}) (string, []byte, error) + func JSONIndent(e error, context map[string]interface{}, prefix, indent string) (string, []byte, error) + func New(e error) error + func NewFromStackTrace(stackTrace []string, msg string) error + func NewFromString(msg string) error + func NewFromStringWithAttach(msg string, attach interface{}) error + func NewFromStringWithAttachf(format string, msg string, attach interface{}) error + func NewFromStringWithDepth(msg string, depth int) error + func NewFromStringWithHeader(msg string, header map[string]interface{}) error + func NewFromStringWithHeaderf(format string, msg string, header map[string]interface{}) error + func NewFromStringWithParam(msg string, params ...interface{}) error + func NewFromStringf(format string, msg ...interface{}) error + func NewWithAttach(e error, msg interface{}) error + func NewWithHeader(e error, header map[string]interface{}) error + func NewWithParam(e error, params ...interface{}) error + func PrintStackFormat(flag int, file string, line int, cause string) string + func ReGen(old error, new error) error + func Split(s string, sub string) []string + func Split2(s string, sub string, tmp *string, rs *[]string) + func ToString(arg interface{}) string + func Wrap(e error) error + func WrapContext(e error, ctx map[string]interface{}) error + type Error struct + Context map[string]interface{} + E error + Errors []error + Flag int + Header map[string][]string + Keyword string + ReGenerated bool + StackTraces []string + func Empty() Error + func MustWrap(e error) Error + func (e *Error) SetHeader(key string, value string) + func (e Error) BasicError() string + func (e Error) Error() string + func (e Error) GenerateKeyword() string + func (e Error) GetHeader(key string) string + func (e Error) PrintStackTrace() string + func (e Error) StackTrace() string + func (e Error) StackTraceValue() string + func (e Error) String() string + type Generator interface + NewV4 func() (UUID, error) + type Reporter struct + HandleMode map[string]func(e error, context map[string]interface{}) + Url map[string]string + func NewReporter(mode string) *Reporter + func (r *Reporter) AddModeHandler(mode string, f func(e error, context map[string]interface{})) *Reporter + func (r *Reporter) AddURL(mode string, url string) *Reporter + func (r *Reporter) Mode(mode string) *Reporter + func (r *Reporter) SetContextName(name string) + func (r *Reporter) SetMode(mode string) + func (r Reporter) DefaultHandler(e error, context map[string]interface{}) + func (r Reporter) JSON(e error, context map[string]interface{}) (string, []byte, error) + func (r Reporter) JSONIndent(e error, context map[string]interface{}, prefix, indent string) (string, []byte, error) + func (r Reporter) ReportURLHandler(e error, context map[string]interface{}) + func (r Reporter) SaveError(e error, context map[string]interface{}) string + type ServiceError struct + Errcode int + Errmsg string + func IsServiceErr(src error, dest ...error) (ServiceError, bool) + func NewServiceError(errmsg string, errcode int) ServiceError + func (se ServiceError) Equal(dest ServiceError) bool + func (se ServiceError) Error() string + type UUID [Size]byte + func NewV4() (UUID, error) + func (u *UUID) SetVariant(v byte) + func (u *UUID) SetVersion(v byte) + func (u UUID) String() string