core: Index | Files | Directories

package errors

import ""

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


Package Files

errors.go multi_error.go

func Cause Uses

func Cause(err error) error

Cause returns the root cause of this error.

func Combine Uses

func Combine(maybeError ...error) error

func GetSeverity Uses

func GetSeverity(err error) log.Severity

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

type Error Uses

type Error struct {
    // contains filtered or unexported fields

Error is an error object with underlying error.

func New Uses

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

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

func (*Error) AtDebug Uses

func (err *Error) AtDebug() *Error

AtDebug sets the severity to debug.

func (*Error) AtError Uses

func (err *Error) AtError() *Error

AtError sets the severity to error.

func (*Error) AtInfo Uses

func (err *Error) AtInfo() *Error

AtInfo sets the severity to info.

func (*Error) AtWarning Uses

func (err *Error) AtWarning() *Error

AtWarning sets the severity to warning.

func (*Error) Base Uses

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

func (*Error) Error Uses

func (err *Error) Error() string

Error implements error.Error().

func (*Error) Inner Uses

func (err *Error) Inner() error

Inner implements hasInnerError.Inner()

func (*Error) Severity Uses

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

func (*Error) String Uses

func (err *Error) String() string

String returns the string representation of this error.

func (*Error) WithPathObj Uses

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

func (*Error) WriteToLog Uses

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

WriteToLog writes current error into log.

type ExportOption Uses

type ExportOption func(*ExportOptionHolder)

type ExportOptionHolder Uses

type ExportOptionHolder struct {
    SessionID uint32



Package errors imports 5 packages (graph) and is imported by 628 packages. Updated 2020-10-15. Refresh now. Tools for package owners.