errors

package
v0.0.0-...-d65df50 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2016 License: BSD-2-Clause Imports: 8 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidTableError = NewError("Invalid Table").(*Error)
	DuplicateKeyError = NewError("Duplicate Key").(*Error)
	NoIndexError      = NewError("No index matches the filter").(*Error)
	OpNotSupported    = NewError("Operation not supported by the index").(*Error)
	EmptyResult       = NewError("No results found for query").(*Error)
)

Functions

func Context

func Context(err error) error

Context wraps the error with an underlying "contextual" error object containing a stack trace

func NewError

func NewError(msg string, args ...interface{}) error

func Print

func Print(e error)

func Sprint

func Sprint(e error) string

Types

type Error

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

func Wrap

func Wrap(err error) *Error

func (*Error) Error

func (err *Error) Error() string

func (Error) GetStack

func (err Error) GetStack() []string

func (Error) MarshalBson

func (e Error) MarshalBson(buf *bytes2.ChunkedWriter, key string)

MarshalBson overrides the vitess library's marshaling of strings that encodes strings as binary

func (*Error) String

func (err *Error) String() string

func (*Error) UnmarshalBson

func (e *Error) UnmarshalBson(buf *bytes.Buffer, kind byte)

Jump to

Keyboard shortcuts

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