errors

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 2 Imported by: 20

Documentation

Index

Constants

View Source
const Prefix = "opcua: "

Prefix is the default error string prefix

Variables

This section is empty.

Functions

func As added in v0.3.4

func As(err error, target interface{}) bool

As wraps errors.As

func Equal added in v0.1.7

func Equal(err1, err2 error) bool

Equal returns true if the two errors have the same error message.

todo(fs): the reason we need this function and cannot just use todo(fs): reflect.DeepEqual(err1, err2) is that by using github.com/pkg/errors todo(fs): the underlying stack traces change and because of this the errors todo(fs): are no longer comparable. This is a downside of basing our errors todo(fs): errors implementation on github.com/pkg/errors and we may want to todo(fs): revisit this. todo(fs): See https://golang.ir/play/p/1WqB7u4BUf7 (by @kung-foo)

func Errorf

func Errorf(format string, a ...interface{}) error

Errorf wraps github.com/pig/errors#Errorf`

func Is added in v0.3.4

func Is(err error, target error) bool

Is wraps errors.Is

func Join added in v0.5.1

func Join(errs ...error) error

Join wraps errors.Join

func New

func New(text string) error

New wraps github.com/pkg/errors#New

func Unwrap added in v0.3.4

func Unwrap(err error) error

Unwrap wraps errors.Unwrap

Types

This section is empty.

Jump to

Keyboard shortcuts

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