errutil

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package errutil contains helpers for error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorPath added in v0.9.8

func ErrorPath(list ...string) string

ErrorPath combines multiple path elements into one string path.

func ErrorReason added in v0.8.8

func ErrorReason(err error) string

ErrorReason find error reason attached in status error.

func NewError added in v0.9.10

func NewError(code codes.Code, name string, msg string) error

NewError returns a Status error with path or name field.

func NewIndexError added in v0.9.8

func NewIndexError(code codes.Code, name string, index int, msg string) error

NewIndexError returns a Status error with an additional index metadata field.

func NotFound added in v0.9.13

func NotFound(err error) bool

NotFound checks if the given error is not found.

func WithErrorReason added in v0.8.8

func WithErrorReason(reason string, err error) error

WithErrorReason add error reason to status error.

func WithMetadata added in v0.9.8

func WithMetadata(key, value string, err error) error

WithMetadata attaches or replaces a key/value pair to ErrorInfo detail status error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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