MCPcopy
hub / github.com/grpc/grpc-go / Error

Function Error

status/status.go:58–60  ·  view source on GitHub ↗

Error returns an error representing c and msg. If c is OK, returns nil.

(c codes.Code, msg string)

Source from the content-addressed store, hash-verified

56
57// Error returns an error representing c and msg. If c is OK, returns nil.
58func Error(c codes.Code, msg string) error {
59 return New(c, msg).Err()
60}
61
62// Errorf returns Error(c, fmt.Sprintf(format, a...)).
63func Errorf(c codes.Code, format string, a ...any) error {

Callers 15

newClientStreamFunction · 0.92
recvMsgMethod · 0.92
newNonRetryClientStreamFunction · 0.92
RecvMsgMethod · 0.92
SetHeaderMethod · 0.92
SendHeaderMethod · 0.92
RecvMsgMethod · 0.92
rpc_util.goFile · 0.92
toRPCErrFunction · 0.92
pickMethod · 0.92
clientconn.goFile · 0.92
startHealthCheckMethod · 0.92

Calls 2

ErrMethod · 0.80
NewFunction · 0.70