Mercurial > lbo > hg > clusterconsensus
changeset 42:0dd3054a993c
Log more client RPC errors
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Fri, 26 Jul 2019 07:55:02 +0200 |
parents | dbb3ad4fc03b |
children | 2995d688667f |
files | example_clusterrpc/example.go |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/example_clusterrpc/example.go Fri Jul 26 07:53:01 2019 +0200 +++ b/example_clusterrpc/example.go Fri Jul 26 07:55:02 2019 +0200 @@ -71,6 +71,7 @@ } resp := rpcReq.GoProto(&req) if !resp.Ok() { + glog.Error(c.host, ": RPC error in Prepare: ", resp.Error()) return 0, errors.New(resp.Error()) } var respMsg proto.PrepareResponse @@ -96,7 +97,7 @@ } resp := rpcReq.GoProto(&req) if !resp.Ok() { - glog.Error(c.host, ": RPC error: ", resp.Error()) + glog.Error(c.host, ": RPC error in Accept: ", resp.Error()) return false, errors.New(resp.Error()) } var respMsg proto.GenericResponse @@ -119,6 +120,7 @@ } resp := rpcReq.GoProto(req) if !resp.Ok() { + glog.Error(c.host, ": RPC error in AddMember: ", resp.Error()) return errors.New(resp.Error()) } var respMsg proto.GenericResponse @@ -140,6 +142,7 @@ } resp := rpcReq.GoProto(req) if !resp.Ok() { + glog.Error(c.host, ": RPC error in RemoveMember: ", resp.Error()) return errors.New(resp.Error()) } var respMsg proto.GenericResponse @@ -179,6 +182,7 @@ } resp := rpcReq.GoProto(req) if !resp.Ok() { + glog.Error(c.host, ": RPC error in StartParticipation: ", resp.Error()) return errors.New(resp.Error()) } resp.GetResponseMessage(&respMsg) @@ -203,6 +207,7 @@ } resp := rpcReq.GoProto(req) if !resp.Ok() { + glog.Error(c.host, ": RPC error in Submit: ", resp.Error()) return errors.New(resp.Error()) } resp.GetResponseMessage(&respMsg)