errors

package
v0.0.0-...-654ee49 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix = "opcua: "

Prefix is the default error string prefix

Variables

This section is empty.

Functions

func As

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

As wraps errors.As

func Equal

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://play.golang.org/p/1WqB7u4BUf7 (by @kung-foo)

func Errorf

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

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

func Is

func Is(err error, target error) bool

Is wraps errors.Is

func Join

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

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