werror

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Err error // the underlying error

	// The error message of the underlying error, or an empty string if
	// the underlying error is nil.
	Code    string
	Message string
}

func Wrap

func Wrap(err, msgErr error) *Error

Wrap wraps err with a new error, whose error message is inherited from msgErr.

func Wrapf added in v0.2.9

func Wrapf(err error, format string, a ...interface{}) *Error

Wrapf wraps err with a new error, whose error message is calculated by formatting.

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface.

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap follows the Unwrap convention introduced in Go 1.13, See https://blog.golang.org/go1.13-errors

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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