errors

package
v1.250306.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MPL-2.0 Imports: 6 Imported by: 853

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 AllEqual added in v1.8.2

func AllEqual(expected error, actual error) bool

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.

func LogDebug added in v1.8.17

func LogDebug(ctx context.Context, msg ...interface{})

func LogDebugInner added in v1.8.17

func LogDebugInner(ctx context.Context, inner error, msg ...interface{})

func LogError added in v1.8.17

func LogError(ctx context.Context, msg ...interface{})

func LogErrorInner added in v1.8.17

func LogErrorInner(ctx context.Context, inner error, msg ...interface{})

func LogInfo added in v1.8.17

func LogInfo(ctx context.Context, msg ...interface{})

func LogInfoInner added in v1.8.17

func LogInfoInner(ctx context.Context, inner error, msg ...interface{})

func LogWarning added in v1.8.17

func LogWarning(ctx context.Context, msg ...interface{})

func LogWarningInner added in v1.8.17

func LogWarningInner(ctx context.Context, inner error, msg ...interface{})

func PrintDeprecatedFeatureWarning added in v1.250306.0

func PrintDeprecatedFeatureWarning(feature string, migrateFeature string)

PrintDeprecatedFeatureWarning prints a warning for deprecated and going to be removed feature. Do not remove this function even there is no reference to it.

func PrintMigrateFeatureInfo added in v1.250306.0

func PrintMigrateFeatureInfo(sourceFeature string, targetFeature string)

PrintMigrateFeatureInfo prints a notice of the upcoming feature migration. Place it after the source feature related config file pharser code. Important note: Only use this when the target migrating feature is under construction. Important note: Even when the target migrating feature has finished its construction, this notice can still be used yet before announcing deprecation of the old feature. Do not remove this function even there is no reference to it.

func PrintRemovedFeatureError added in v1.250306.0

func PrintRemovedFeatureError(feature string, migrateFeature string) error

PrintRemovedFeatureError prints an error message for removed feature then return an error. And after long enough time the message can also be removed, uses as an indicator. Do not remove this function even there is no reference to it.

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) 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) Unwrap added in v1.5.7

func (err *Error) Unwrap() error

Unwrap implements hasInnerError.Unwrap()

type ExportOption

type ExportOption func(*ExportOptionHolder)

type ExportOptionHolder

type ExportOptionHolder struct {
	SessionID uint32
}

Jump to

Keyboard shortcuts

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