处理错误码

This commit is contained in:
wh_zcy 2022-12-14 11:03:54 +08:00
parent 8e8f145bbc
commit 7dca2bdfae

View File

@ -127,8 +127,14 @@ func (r *Robot) SendMsg(mainType, subType string, req proto.Message, rsp proto.M
if !ProtoUnmarshal(msg, rsp) {
break
}
return pb.ErrorCode_Success
} else if msg.MainType == "notify" && msg.SubType == "errornotify" {
rsp := &pb.NotifyErrorNotifyPush{}
if !ProtoUnmarshal(msg, rsp) {
break
}
logrus.Info(rsp.Code)
return rsp.Code
}
}
}
@ -224,7 +230,7 @@ func (m *Robot) syncCall() {
//这里执行会花很长时间
if err := scene.Run(m); err != nil {
logrus.WithField("err", err).Error("执行业务时发生错误")
break
continue
}
elapsedTime := time.Since(start)