errors

package
v2.24.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 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.

Types

type Error

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

Error is an error object with underlying error.

func New

func New(msg ...interface{}) *Error

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

func (*Error) AtDebug

func (v *Error) AtDebug() *Error

AtDebug sets the severity to debug.

func (*Error) AtError

func (v *Error) AtError() *Error

AtError sets the severity to error.

func (*Error) AtInfo

func (v *Error) AtInfo() *Error

AtInfo sets the severity to info.

func (*Error) AtWarning

func (v *Error) AtWarning() *Error

AtWarning sets the severity to warning.

func (*Error) Base

func (v *Error) Base(err error) *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()

func (*Error) Path

func (v *Error) Path(path ...string) *Error

Path sets the path to the location where this error happens.

func (*Error) Severity

func (v *Error) Severity() Severity

type Severity

type Severity int

Severity describes how severe the error is.

const (
	SeverityDebug Severity = iota
	SeverityInfo
	SeverityWarning
	SeverityError
)

func GetSeverity

func GetSeverity(err error) Severity

Jump to

Keyboard shortcuts

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