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