errors

package
v0.0.0-...-c5655c4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 3 Imported by: 15

Documentation

Index

Constants

View Source
const MaxStackDepth = 50

MaxStackDepth since we cannot have unlimitted stack traces.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

Error is a customized error that will get the stack.

func Errorf

func Errorf(format string, a ...interface{}) *Error

Errorf is a wrapper of New(fmt.Errorf(...))

func New

func New(e interface{}) *Error

New creates a new error with the error and a stack at the time of the call.

func (Error) Error

func (err Error) Error() string

func (Error) GetStackTrace

func (err Error) GetStackTrace() string

GetStackTrace will turn the stored stack into hunman readable form. Each item in the returned slice represent one stack frame.

type HandlerStatusError

type HandlerStatusError struct {
	// HTTPStatus ..
	HTTPStatus int
	// Err ..
	Err error
}

HandlerStatusError ..

func (HandlerStatusError) Error

func (hse HandlerStatusError) Error() string

Error satisfy the error interface.

func (HandlerStatusError) Status

func (hse HandlerStatusError) Status() int

Status ..

Jump to

Keyboard shortcuts

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