errors

package
v0.0.0-...-446988d Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package errors provides the common infrastructure for managing errors. It is primarily a wrapper around github.com/pkg/errors package. See https://godoc.org/github.com/pkg/errors for usage instructions.

While it is possible for most packages to use this package without needing the underlying package it is wrapping, certain usecases (such as interacting with the recorded stack trace) cannot avoid leakage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

Cause returns the underlying cause of the error, if possible. See https://godoc.org/github.com/pkg/errors#Cause for further details.

func Errorf

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

Errorf formats according to a format specifier and returns the string as a value that satisfies error. See https://godoc.org/github.com/pkg/errors#Errorf for further details

func New

func New(message string) error

New returns an error with the supplied message. See https://godoc.org/github.com/pkg/errors#New for further details

func Wrap

func Wrap(err error, message string) error

Wrap returns an error annotating err with message. If err is nil, Wrap returns nil. See https://godoc.org/github.com/pkg/errors#Wrap for more details.

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Wrapf returns an error annotating err with the format specifier. If err is nil, Wrapf returns nil. See https://godoc.org/github.com/pkg/errors#Wrapf for more details.

Types

type StackTracer

type StackTracer interface {
	StackTrace() errors.StackTrace
}

StackTracer represents a type (usually an error) that can provide a stack trace.

Jump to

Keyboard shortcuts

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