Documentation
¶
Index ¶
- Constants
- func RegisterRootPath(paths []string)
- func StandardColorFormat() string
- func StandardFormat() string
- type ErrLevel
- type ErrPayload
- type ErrorLevel
- type ErrorPayload
- type SErr
- func New(message string) SErr
- func NewFromError(err error) SErr
- func NewFromErrorc(err error, title string) SErr
- func NewFromErrori(code int, err error) SErr
- func NewFromErrork(key string, err error) SErr
- func NewFromErrorkc(err error, key string, title string) SErr
- func NewFromErrorl(level ErrorLevel, err error) SErr
- func NewFromErrors(callerSkip int, err error) SErr
- func Newc(message string, title string) SErr
- func Newf(format string, args ...interface{}) SErr
- func Newi(code int, message string) SErr
- func Newif(code int, frmt string, args ...interface{}) SErr
- func Newik(code int, key string, message string) SErr
- func Newikc(code int, key string, message string, title string) SErr
- func Newk(key string, message string) SErr
- func Newkc(key string, message string, title string) SErr
- func Newkf(key string, frmt string, args ...interface{}) SErr
- func Newl(level ErrorLevel, message string) SErr
- func Newlc(level ErrorLevel, message string, title string) SErr
- func Newlf(level ErrorLevel, message string, args ...interface{}) SErr
- func Newli(level ErrorLevel, code int, message string) SErr
- func Newlic(level ErrorLevel, code int, message string, title string) SErr
- func Newlik(level ErrorLevel, code int, key string, message string) SErr
- func Newlikc(level ErrorLevel, code int, key string, message string, title string) SErr
- func Newlk(level ErrorLevel, key string, message string) SErr
- func Newlkc(level ErrorLevel, key string, message string, title string) SErr
- func News(callerSkip int, message string) SErr
- func Newsc(callerSkip int, message string, title string) SErr
- func Newsf(callerSkip int, message string, args ...interface{}) SErr
- func Newsi(callerSkip int, code int, message string) SErr
- func Newsic(callerSkip int, code int, message string, title string) SErr
- func Newsik(callerSkip int, code int, key string, message string) SErr
- func Newsikc(callerSkip int, code int, key string, message string, title string) SErr
- func Newsk(callerSkip int, key string, message string) SErr
- func Newskc(callerSkip int, key string, message string, title string) SErr
- func Newsl(callerSkip int, level ErrorLevel, message string) SErr
- func Newslc(callerSkip int, level ErrorLevel, message string, title string) SErr
- func Newsli(callerSkip int, level ErrorLevel, code int, message string) SErr
- func Newslic(callerSkip int, level ErrorLevel, code int, message string, title string) SErr
- func Newslik(callerSkip int, level ErrorLevel, code int, key string, message string) SErr
- func Newslikc(callerSkip int, level ErrorLevel, code int, key string, message string, ...) SErr
- func Newslk(callerSkip int, level ErrorLevel, key string, message string) SErr
- func RegisterHereAsRootPath(callerSkip int, pathSkip int) SErr
- func RegisterThisAsRoot(callerSkip int, pathSkip int) SErr
- type SErrs
Constants ¶
const ( // ErrLevelFatal constant for fatal error level // // Deprecated, use ErrorLevelFatal instead! ErrLevelFatal = ErrorLevelFatal // ErrLevelWarn constant for warning error level // // Deprecated, use ErrorLevelWarn instead! ErrLevelWarn = ErrorLevelWarn // ErrLevelInfo constant for info error level // // Deprecated, use ErrorLevelInfo instead! ErrLevelInfo = ErrorLevelInfo // ErrKeyNothing constant for empty error key // // Deprecated, use ErrorKeyNothing instead! ErrKeyNothing = ErrorKeyNothing // ErrKeyUnexpected constant for unexpected error key // // Deprecated, use ErrorKeyUnexpected instead! ErrKeyUnexpected = ErrorKeyUnexpected // ErrKeyExpected constant for expected error key // // Deprecated, use ErrorKeyExpected instead! ErrKeyExpected = ErrorKeyExpected // ErrCodeNothing constant for empty error code // // Deprecated, use ErrorCodeNothing instead! ErrCodeNothing = ErrorCodeNothing )
const ( // ErrorKeyNothing constant for empty error key ErrorKeyNothing = "-" // ErrorKeyUnexpected constant for unexpected error key ErrorKeyUnexpected = "unexpected" // ErrorKeyExpected constant for expected error key ErrorKeyExpected = "expected" // ErrorCodeNothing constant for empty error code ErrorCodeNothing = 0 )
Variables ¶
This section is empty.
Functions ¶
func RegisterRootPath ¶ added in v1.1.5
func RegisterRootPath(paths []string)
RegisterRootPath to registering the root path.
func StandardColorFormat ¶ added in v1.1.0
func StandardColorFormat() string
StandardColorFormat function
Types ¶
type ErrPayload ¶
type ErrPayload = ErrorPayload
ErrPayload type
Deprecated, use ErrorPayload instead!
type ErrorLevel ¶ added in v1.1.8
type ErrorLevel string
ErrorLevel type
const ( // ErrorLevelFatal for fatal error ErrorLevelFatal ErrorLevel = "fatal" // ErrorLevelValidation for validation error ErrorLevelValidation ErrorLevel = "warn" // ErrorLevelWarn for warning error ErrorLevelWarn ErrorLevel = "warn" // ErrorLevelInfo for information error ErrorLevelInfo ErrorLevel = "info" )
type SErr ¶
type SErr interface {
Error() string
Cause() error
Level() ErrorLevel
Code() int
Key() string
Title() string
Comments() string
CommentStack() []string
Payload() ErrorPayload
Callers() []uintptr
StackFrames() []gerr.StackFrame
Type() string
File() string
Line() int
FN() string
Package() string
String() string
ColoredString() string
SimpleString() string
SetKey(key string)
SetCode(code int)
SetLevel(lvl ErrorLevel)
AddComment(msg string)
AddComments(skip int, msg string)
AddCommentf(msg string, opts ...interface{})
ApplyPayload(payload ErrorPayload)
SetPayload(key string, value interface{})
}
SErr interface
func NewFromErrorc ¶
NewFromErrorc serr from error and title
func NewFromErrori ¶
NewFromErrori serr from error and error code
func NewFromErrork ¶
NewFromErrork serr from error and error key
func NewFromErrorkc ¶ added in v1.1.7
NewFromErrorkc serr from error, error key, and title
func NewFromErrorl ¶
func NewFromErrorl(level ErrorLevel, err error) SErr
NewFromErrorl serr from error and error level
func NewFromErrors ¶ added in v1.1.0
NewFromErrors serr from error and stack callerSkip
func Newlc ¶
func Newlc(level ErrorLevel, message string, title string) SErr
Newlc serr from error level and title
func Newlf ¶
func Newlf(level ErrorLevel, message string, args ...interface{}) SErr
Newlf serr from error level with message binding
func Newli ¶
func Newli(level ErrorLevel, code int, message string) SErr
Newli serr from error level and error code
func Newlic ¶ added in v1.1.0
func Newlic(level ErrorLevel, code int, message string, title string) SErr
Newlic serr from error level, error code and title
func Newlik ¶ added in v1.1.0
func Newlik(level ErrorLevel, code int, key string, message string) SErr
Newlik serr from error level, error code and error key
func Newlk ¶
func Newlk(level ErrorLevel, key string, message string) SErr
Newlk serr from error level and error key
func Newlkc ¶ added in v1.1.0
func Newlkc(level ErrorLevel, key string, message string, title string) SErr
Newlkc serr from error level, error key and title
func Newsl ¶ added in v1.1.0
func Newsl(callerSkip int, level ErrorLevel, message string) SErr
Newsl serr from stack callerSkip and error level
func Newslc ¶ added in v1.1.0
func Newslc(callerSkip int, level ErrorLevel, message string, title string) SErr
Newslc serr from stack callerSkip, error level and title
func Newsli ¶ added in v1.1.0
func Newsli(callerSkip int, level ErrorLevel, code int, message string) SErr
Newsli serr from stack callerSkip, error level and error code
func Newslic ¶ added in v1.1.0
Newslic serr from stack callerSkip, error level, error code and title
func Newslik ¶ added in v1.1.0
Newslik serr from stack callerSkip, error level, error code and error key
func Newslikc ¶ added in v1.1.0
func Newslikc(callerSkip int, level ErrorLevel, code int, key string, message string, title string) SErr
Newslikc serr from stack callerSkip, error level, error code, error key and title
func Newslk ¶ added in v1.1.0
func Newslk(callerSkip int, level ErrorLevel, key string, message string) SErr
Newslk serr from stack callerSkip, error level and error key
func RegisterHereAsRootPath ¶ added in v1.1.8
RegisterHereAsRootPath to registering here (current file path) as a root path.
func RegisterThisAsRoot ¶ added in v1.1.5
RegisterThisAsRoot to registering here (current file path) as a root path.
Deprecated, use RegisterHereAsRootPath instead!
type SErrs ¶
type SErrs []SErr
SErrs type mutiple standard error
func (*SErrs) CaptureSErr ¶
CaptureSErr to capture standard error