errors

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorCode

func ErrorCode(err error) int32

func New

func New(code interface{}, msg string) error

func Newf

func Newf(code interface{}, format string, a ...interface{}) error

func RegisterImplementor

func RegisterImplementor(prompter Prompter)

RegisterImplementor registers the error prompter service implementor.

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

func UnaryResponseInterceptor

func UnaryResponseInterceptor() grpc.UnaryServerInterceptor

func With added in v1.0.0

func With(err error, msg string) error

func Withf added in v1.0.0

func Withf(err error, format string, a ...interface{}) error

Types

type Prompter

type Prompter interface {
	Translate(code int32) string
}

func Implementor

func Implementor() Prompter

Implementor returns the error prompter service implementor.

type StatusError

type StatusError spb.Status

func (*StatusError) Error

func (err *StatusError) Error() string

Jump to

Keyboard shortcuts

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