cerrors

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0, BSD-2-Clause Imports: 1 Imported by: 6

Documentation

Overview

Package cerrors provides sentinel error values for common errors that are likely to appear in multiple packages.

Since wrapping errors using the new error handling API of Go creates anonymous errors it is not possible to wrap an existing sentinel error with another sentinel error without loosing the stack trace.

Using shared sentinel errors enables them to be annotated and used across packages borders without the caller having to distinguish between similar errors types of different packages that would otherwise be identical.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBase58DecodeFailed is returned if a base58 encoded string can not be decoded.
	ErrBase58DecodeFailed = errors.New("failed to decode base58 encoded string")

	// ErrParseBytesFailed is returned if information can not be parsed from a sequence of bytes.
	ErrParseBytesFailed = errors.New("failed to parse bytes")

	// ErrFatal is returned if a fatal error occurs that does not allow the program to continue execution.
	ErrFatal = errors.New("fatal error")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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