sgerrors

package
v0.0.0-...-237b7d6 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(err error) open.ResultCode

err转code

func ConvertGRPCError

func ConvertGRPCError(err error) error

err尝试转换成grpc error

func NewErrorWithResultCode

func NewErrorWithResultCode(code open.ResultCode) error

func NewGRpcError

func NewGRpcError(sgErr SGError) error

SGError转换为grpc error

func NewGRpcErrorWithResultCode

func NewGRpcErrorWithResultCode(code open.ResultCode, params ...interface{}) error

SGError转换为grpc error

Types

type PBSGError

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

func NewSGError

func NewSGError(code open.ResultCode, params ...interface{}) PBSGError

func (PBSGError) Code

func (e PBSGError) Code() open.ResultCode

func (PBSGError) Error

func (e PBSGError) Error() string

func (PBSGError) Message

func (e PBSGError) Message() string

type SGError

type SGError interface {
	error
	Code() open.ResultCode
	Message() string
}

*

*@author LanguageY++2013
*2020/2/16 11:33 PM
*

Jump to

Keyboard shortcuts

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