errors

package
v2.18.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package errors is a drop-in replacement for Golang lib 'errors'.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

Cause returns the root cause of this error.

func Format

func Format(format string, values ...interface{}) error

func New

func New(msg ...interface{}) error

New returns a new error object with message formed from given arguments.

Types

type Error

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

Error is an error object with underlying error.

func (*Error) Error

func (v *Error) Error() string

Error implements error.Error().

func (*Error) Inner

func (v *Error) Inner() error

Inner implements hasInnerError.Inner()

type ErrorBuilder

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

func Base

func Base(err error) ErrorBuilder

Base returns an ErrorBuilder based on the given error.

func (ErrorBuilder) Format

func (v ErrorBuilder) Format(format string, values ...interface{}) error

Format returns an errors object with given message format and base error.

func (ErrorBuilder) Message

func (v ErrorBuilder) Message(msg ...interface{}) error

Message returns an error object with given message and base error.

Jump to

Keyboard shortcuts

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