errs

package
v0.0.0-...-32386f8 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: MIT Imports: 3 Imported by: 0

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 {
	error
	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