errswrap

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const GRPCOrigErrorTag = "grpc.error_orig"

Variables

This section is empty.

Functions

func NewError

func NewError(e error, s error) error

Types

type Error

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

Error wraps a pointer of a status proto and an original error. It implements error and Status, and a nil *Error should never be returned by this package.

func (*Error) Error

func (e *Error) Error() string

func (*Error) GRPCStatus

func (e *Error) GRPCStatus() *status.Status

GRPCStatus returns the Status represented by s.

func (*Error) OrigErr added in v0.8.16

func (e *Error) OrigErr() error

type IWrappedError

type IWrappedError interface {
	GRPCStatus() *status.Status
	OrigErr() error
}

Jump to

Keyboard shortcuts

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