MCPcopy Create free account
hub / github.com/33cn/chain33 / ReplyErr

Method ReplyErr

queue/queue.go:365–377  ·  view source on GitHub ↗

ReplyErr reply error

(title string, err error)

Source from the content-addressed store, hash-verified

363
364// ReplyErr reply error
365func (msg *Message) ReplyErr(title string, err error) {
366 var reply types.Reply
367 if err != nil {
368 qlog.Error(title, "reply.err", err.Error())
369 reply.IsOk = false
370 reply.Msg = []byte(err.Error())
371 } else {
372 qlog.Debug(title, "success", "ok")
373 reply.IsOk = true
374 }
375 id := atomic.AddInt64(&gid, 1)
376 msg.Reply(NewMessage(id, "", types.EventReply, &reply))
377}

Callers 15

TestMessage_ReplyErrFunction · 0.95
SetQueueClientMethod · 0.80
SetQueueClientMethod · 0.80
SetQueueClientMethod · 0.80
SetQueueClientMethod · 0.80
SetQueueClientMethod · 0.80
SetQueueClientMethod · 0.80
SetQueueClientMethod · 0.80
SetQueueClientMethod · 0.80
eventDelTxListMethod · 0.80
ProcEventMethod · 0.80
processMsgFunction · 0.80

Calls 4

ReplyMethod · 0.95
NewMessageFunction · 0.70
ErrorMethod · 0.65
DebugMethod · 0.65

Tested by 14

TestMessage_ReplyErrFunction · 0.76
SetQueueClientMethod · 0.64
SetQueueClientMethod · 0.64
SetQueueClientMethod · 0.64
SetQueueClientMethod · 0.64
SetQueueClientMethod · 0.64
SetQueueClientMethod · 0.64
SetQueueClientMethod · 0.64
SetQueueClientMethod · 0.64
processMsgFunction · 0.64
testBlockRecvSubDataFunction · 0.64
testMempoolRecvSubDataFunction · 0.64