errs

package
v0.0.0-...-8b133c7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2015 License: MIT Imports: 3 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultUserMessage = "Oops! Something went wrong. Please try again."
	DefaultOpts        = Opts{
		OmitStack: false,
	}
)

Functions

This section is empty.

Types

type Err

type Err interface {
	Stack() []byte
	Time() time.Time
	StandardError() error
	StandardErrorMessage() string
	UserMessage() string
	SetUserMessage(userMessage string)
	InternalInfo() Info
	LogString() string
}

func New

func New(internalInfo Info, userMessage ...interface{}) Err

func NewWithOpts

func NewWithOpts(internalInfo Info, opts Opts, userMessage ...interface{}) Err

func Wrap

func Wrap(stdErr error, userMessage ...interface{}) Err

func WrapWithInfo

func WrapWithInfo(stdErr error, internalInfo Info, userMessage ...interface{}) Err

func WrapWithOpts

func WrapWithOpts(stdErr error, internalInfo Info, opts Opts, userMessage ...interface{}) Err

type Info

type Info map[string]interface{}

type Opts

type Opts struct {
	OmitStack bool
}

Jump to

Keyboard shortcuts

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