Documentation ¶
Index ¶
- func HasTrace(err error) (isStackTraced bool)
- func Trace(err error, extra ...ErrorKVP) error
- func TraceToString(err error) string
- func UpliftStackTrace(err error) error
- func Wrap(err error, message string, extra ...ErrorKVP) error
- type Error
- func (es *Error) Cause() error
- func (es *Error) Extra() []ErrorKVP
- func (es *Error) Format(s fmt.State, verb rune)
- func (es *Error) HasStack() bool
- func (es *Error) Is(target error) bool
- func (es *Error) MarshalZerologObject(e *zerolog.Event)
- func (es *Error) RawStack() MarshableStack
- func (es *Error) StackTrace() errors.StackTrace
- func (es *Error) TopLine() (error, string)
- func (es *Error) Unwrap() error
- type ErrorKVP
- type IStacker
- type IUnwrapper
- type MarshableStack
- func (m MarshableStack) Format(st fmt.State, verb rune)
- func (m MarshableStack) MarshalString() string
- func (m MarshableStack) MarshalStringFrame(i int) string
- func (m MarshableStack) MarshalZerologArray(a *zerolog.Array)
- func (m MarshableStack) MarshalZerologObject(e *zerolog.Event)
- func (m MarshableStack) StackTrace() errors.StackTrace
- type PCFrame
- func (f PCFrame) File() string
- func (f PCFrame) Format(s fmt.State, verb rune)
- func (f PCFrame) Line() int
- func (f PCFrame) MarshalJSON() ([]byte, error)
- func (f PCFrame) MarshalZerologObject(e *zerolog.Event)
- func (f PCFrame) Name() string
- func (f PCFrame) PC() uintptr
- func (f PCFrame) UnmarshalJSON(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TraceToString ¶
TraceToString converts a trace to a string that can be read, this doesn't capture the extra data just a stack trace This is mostly used for tests to make it more readable if something melts down
func UpliftStackTrace ¶ added in v1.0.2
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func ToTypedError ¶ added in v1.0.2
func (*Error) MarshalZerologObject ¶
func (*Error) RawStack ¶ added in v1.0.2
func (es *Error) RawStack() MarshableStack
func (*Error) StackTrace ¶
func (es *Error) StackTrace() errors.StackTrace
type ErrorKVP ¶
func (ErrorKVP) MarshalZerologObject ¶
type IStacker ¶
type IStacker interface { zerolog.LogObjectMarshaler RawStack() MarshableStack }
type IUnwrapper ¶ added in v1.0.2
type IUnwrapper interface {
Unwrap() error
}
type MarshableStack ¶ added in v1.0.2
type MarshableStack []stackFrame
func GetStackProgramCounter ¶
func GetStackProgramCounter(offset int) MarshableStack
func MarshalStack ¶
func MarshalStack() MarshableStack
func (MarshableStack) Format ¶ added in v1.0.2
func (m MarshableStack) Format(st fmt.State, verb rune)
func (MarshableStack) MarshalString ¶ added in v1.0.2
func (m MarshableStack) MarshalString() string
func (MarshableStack) MarshalStringFrame ¶ added in v1.0.2
func (m MarshableStack) MarshalStringFrame(i int) string
func (MarshableStack) MarshalZerologArray ¶ added in v1.0.2
func (m MarshableStack) MarshalZerologArray(a *zerolog.Array)
func (MarshableStack) MarshalZerologObject ¶ added in v1.0.2
func (m MarshableStack) MarshalZerologObject(e *zerolog.Event)
func (MarshableStack) StackTrace ¶ added in v1.0.2
func (m MarshableStack) StackTrace() errors.StackTrace
type PCFrame ¶
type PCFrame uintptr
func (PCFrame) MarshalJSON ¶
func (PCFrame) MarshalZerologObject ¶
func (PCFrame) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.