errors

package
v0.0.0-...-252cfec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEBUG bool

Functions

func HandleError

func HandleError(ticketID string, err error)

func New

func New(types, message string) error

func Newf

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

func Wrap

func Wrap(types string, err error, message string) error

func Wrapf

func Wrapf(types string, err error, format string, args ...interface{}) error

Types

type Frame

type Frame uintptr

Frame represents a program counter inside a stack frame.

func (Frame) Format

func (f Frame) Format(s fmt.State, verb rune)

Format formats the frame according to the fmt.Formatter interface.

%s    source file
%d    source line
%n    function name
%v    equivalent to %s:%d

Format accepts flags that alter the printing of some verbs, as follows:

%+s   function name and path of source file relative to the compile time
      GOPATH separated by \n\t (<funcname>\n\t<path>)
%+v   equivalent to %+s:%d

type StackTrace

type StackTrace []Frame

StackTrace is stack of Frames from innermost (newest) to outermost (oldest).

func (StackTrace) Format

func (st StackTrace) Format(s fmt.State, verb rune)

Format formats the stack of Frames according to the fmt.Formatter interface.

%s	lists source files for each Frame in the stack
%v	lists the source file and line number for each Frame in the stack

Format accepts flags that alter the printing of some verbs, as follows:

%+v   Prints filename, function, and line number for each Frame in the stack.

type VError

type VError struct {
	// contains filtered or unexported fields
}

func (*VError) Cause

func (r *VError) Cause() error

func (VError) Error

func (r VError) Error() string

func (*VError) Format

func (r *VError) Format(s fmt.State, verb rune)

func (*VError) Msg

func (r *VError) Msg() string

func (VError) StackTrace

func (s VError) StackTrace() StackTrace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL