fishy commented on a change in pull request #2298:
URL: https://github.com/apache/thrift/pull/2298#discussion_r547523241
##########
File path: compiler/cpp/src/thrift/generate/t_go_generator.cc
##########
@@ -2700,8 +2707,8 @@ void t_go_generator::generate_service_server(t_service*
tservice) {
f_types_ << indent() << "func (p *" << serviceName
<< "Processor) Process(ctx context.Context, iprot, oprot
thrift.TProtocol) (success bool, err "
"thrift.TException) {" << endl;
- f_types_ << indent() << " name, _, seqId, err :=
iprot.ReadMessageBegin(ctx)" << endl;
- f_types_ << indent() << " if err != nil { return false, err }" << endl;
+ f_types_ << indent() << " name, _, seqId, err2 :=
iprot.ReadMessageBegin(ctx)" << endl;
Review comment:
Note: all the compiler changes starting from this line are because in
`Process` function we specified the returned error type to be `TException`
instead of just `error`. I'm not sure why is that. If we can make another
breaking change to `TProcessor` and `TProcessorFunction` to change the return
type to `error` these changes can be avoided.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]