cerrors

package
v0.3.0-nightly.20220614 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cerrors contains functions related to error handling.

The standard library's errors package is missing some functionality which we need, such as stack traces. To be certain that all errors created in Conduit are created with the additional information, usage of this package is mandatory.

At present, the package acts as a "thin forwarding layer", where we "mix and match" functions from different packages.

Package cerrors contains functions related to error handling.

The standard library's errors package is missing some functionality which we need, such as stack traces. To be certain that all errors created in Conduit are created with the additional information, usage of this package is mandatory.

At present, the package acts as a "thin forwarding layer", where we "mix and match" functions from different packages.

Index

Constants

This section is empty.

Variables

View Source
var (
	New    = xerrors.New    //nolint:forbidigo // xerrors.New is allowed here, but not anywhere else
	Errorf = xerrors.Errorf //nolint:forbidigo // xerrors.Errorf is allowed here, but not anywhere else
	Is     = errors.Is
	As     = errors.As
	Unwrap = errors.Unwrap
)
View Source
var (
	// ErrNotImpl should be used when a functionality which is not yet implemented was called.
	ErrNotImpl = New("not impl")
	// ErrEmptyID should be used when an entity was requested, but the ID was not provided.
	ErrEmptyID = New("empty ID")
)

Functions

func GetStackTrace

func GetStackTrace(err error) interface{}

Types

type Frame

type Frame struct {
	Func string `json:"func,omitempty"`
	File string `json:"file,omitempty"`
	Line int    `json:"line,omitempty"`
}

Jump to

Keyboard shortcuts

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