errors

package
v0.0.0-...-af7b024 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Overview

Package errors implements functions to manipulate errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(err error) codes.Code

Code returns the error code for `err`. Otherwise, it returns codes.Unknown.

func ErrorDesc

func ErrorDesc(err error) string

ErrorDesc returns the error description of `err`. Otherwise, it returns err.Error(), or an empty string when `err` is nil.

func Errorf

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

Errorf returns an error containing an error code and a description. Errorf returns nil if `c` is OK.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error defines an error with an associated code value.

func (*Error) Error

func (e *Error) Error() string

Error implements the builtin error interface.

Jump to

Keyboard shortcuts

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