Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct { Message string // contains filtered or unexported fields }
Error is an error with context
func (*Error) WriteError ¶
WriteError implements ErrorWriter
type ErrorMsger ¶ added in v0.1.3
type ErrorMsger interface {
ErrorMsg() string
}
ErrorMsger returns the error message
type ErrorOpt ¶
type ErrorOpt = func(e *Error)
ErrorOpt is an error options function used by New
type ErrorWriter ¶
ErrorWriter writes errors to an io.Writer
type StackStringer ¶ added in v0.1.2
type StackStringer interface {
StackString() string
}
StackStringer returns a stacktrace string
type StackTrace ¶
type StackTrace struct {
// contains filtered or unexported fields
}
StackTrace is an error stack trace
func NewStackTrace ¶
func NewStackTrace(skip int) *StackTrace
NewStackTrace creates a new *StackTrace
func (*StackTrace) Error ¶
func (e *StackTrace) Error() string
Error implements error and prints the stack trace
func (*StackTrace) PC ¶ added in v0.1.5
func (e *StackTrace) PC() []uintptr
func (*StackTrace) StackString ¶
func (e *StackTrace) StackString() string
StackString implements StackStringer and formats each frame of the stack trace with the default format
func (*StackTrace) WriteError ¶
func (e *StackTrace) WriteError(b io.Writer)
WriteError implements ErrorWriter and writes the stack trace
Click to show internal directories.
Click to hide internal directories.