go-agent: github.com/sqreen/go-agent/agent/sqlib/sqerrors Index | Files

package sqerrors

import "github.com/sqreen/go-agent/agent/sqlib/sqerrors"

Index

Package Files

errors.go frame.go

func Errorf Uses

func Errorf(format string, args ...interface{}) error

Errorf returns a new errors whose message is formatted by `fmt.Sprintf`. The returned error is annotated with a timestamp, a message and a stack trace.

func New Uses

func New(message string) error

New returns a new error annotated with a timestamp, a message and a stack trace.

func StackTrace Uses

func StackTrace(err error) errors.StackTrace

StackTrace returns the earliest/deepest StackTrace attached to any of the errors in the chain of Causes. If the error does not implement Cause, the original error will be returned. If the error is nil, nil will be returned without further investigation.

func WithTimestamp Uses

func WithTimestamp(err error) error

WithTimestamp annotates the given error `err` with a timestamp. The returned error value implements interface Timestamper.

func Wrap Uses

func Wrap(err error, message string) error

Wrap annotates the given error `err` with a timestamp, a message and a stack trace.

type Causer Uses

type Causer interface {
    Cause() error
}

type Frame Uses

type Frame errors.Frame

Frame represents a program counter inside a stack frame. For historical reasons if Frame is interpreted as a uintptr its value represents the program counter + 1.

func (Frame) File Uses

func (f Frame) File() string

File returns the full path to the file that contains the function for this Frame's pc.

func (Frame) Line Uses

func (f Frame) Line() int

Line returns the line number of source code of the function for this Frame's pc.

func (Frame) Name Uses

func (f Frame) Name() string

name returns the name of this function, if known.

func (Frame) PC Uses

func (f Frame) PC() uintptr

PC returns the program counter for this frame; multiple frames may have the same PC value.

type StackTracer Uses

type StackTracer interface {
    StackTrace() errors.StackTrace
}

type Timestamper Uses

type Timestamper interface {
    Timestamp() time.Time
}

Package sqerrors imports 5 packages (graph) and is imported by 10 packages. Updated 2019-08-14. Refresh now. Tools for package owners.