errors

package
v4.45.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 5 Imported by: 92

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 Combine

func Combine(maybeError ...error) error

func GetSeverity

func GetSeverity(err error) log.Severity

GetSeverity returns the actual severity of the error, including inner errors.

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 (err *Error) AtDebug() *Error

AtDebug sets the severity to debug.

func (*Error) AtError

func (err *Error) AtError() *Error

AtError sets the severity to error.

func (*Error) AtInfo

func (err *Error) AtInfo() *Error

AtInfo sets the severity to info.

func (*Error) AtWarning

func (err *Error) AtWarning() *Error

AtWarning sets the severity to warning.

func (*Error) Base

func (err *Error) Base(e error) *Error

func (*Error) Error

func (err *Error) Error() string

Error implements error.Error().

func (*Error) Inner

func (err *Error) Inner() error

Inner implements hasInnerError.Inner()

func (*Error) Severity

func (err *Error) Severity() log.Severity

func (*Error) String

func (err *Error) String() string

String returns the string representation of this error.

func (*Error) WithPathObj

func (err *Error) WithPathObj(obj interface{}) *Error

func (*Error) WriteToLog

func (err *Error) WriteToLog(opts ...ExportOption)

WriteToLog writes current error into log.

type ExportOption

type ExportOption func(*ExportOptionHolder)

type ExportOptionHolder

type ExportOptionHolder struct {
	SessionID uint32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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