Documentation ¶
Overview ¶
Errors and error utility functions.
Index ¶
- Variables
- func Assert(condition bool, description string, args ...interface{})
- func Errors(errs ...error) error
- func First(args ...interface{}) error
- func Format(format string, args ...interface{}) error
- func FormatSkipStackFrames(skip int, format string, args ...interface{}) error
- func LastPanicOnError(args ...interface{})
- func PanicIfErrIndexOutOfBounds(what string, index int, length int)
- func PanicOnError(args ...interface{})
- type Configuration
- type ErrIndexOutOfBounds
- type ErrNotImplemented
- type ErrSlice
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configuration{ FormatWithCallStack: true, }
Functions ¶
func FormatSkipStackFrames ¶
FormatSkipStackFrames formats an error with call stack information if FormatWithCallStack is true. It skips skip stack frames.
func LastPanicOnError ¶
func LastPanicOnError(args ...interface{})
Panic if the last element of args is a non nil error
func PanicOnError ¶
func PanicOnError(args ...interface{})
Panic if any of the args is a non nil error
Types ¶
type Configuration ¶
type Configuration struct {
FormatWithCallStack bool
}
type ErrIndexOutOfBounds ¶
func IfErrIndexOutOfBounds ¶
func IfErrIndexOutOfBounds(what string, index int, length int) *ErrIndexOutOfBounds
func (*ErrIndexOutOfBounds) Error ¶
func (self *ErrIndexOutOfBounds) Error() string
type ErrNotImplemented ¶
type ErrNotImplemented string
func (ErrNotImplemented) Error ¶
func (self ErrNotImplemented) Error() string
Click to show internal directories.
Click to hide internal directories.