From: Jens Geyer Date: Sat, 1 Feb 2014 02:58:40 +0000 (+0100) Subject: THRIFT-2340 Generated server implementation does not send response type EXCEPTION... X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=483d791f64f0cddf765c2ea991cdbe8fda787e91;p=common%2Fthrift.git THRIFT-2340 Generated server implementation does not send response type EXCEPTION on the Thrift.TApplicationExceptionType.UNKNOWN_METHOD exception Patch: Tomasz A. Biczel --- diff --git a/compiler/cpp/src/generate/t_js_generator.cc b/compiler/cpp/src/generate/t_js_generator.cc index 7c42c019..c9ad467f 100644 --- a/compiler/cpp/src/generate/t_js_generator.cc +++ b/compiler/cpp/src/generate/t_js_generator.cc @@ -815,7 +815,7 @@ void t_js_generator::generate_service_processor(t_service* tservice) { << indent() << " input.skip(Thrift.Type.STRUCT);" << endl << indent() << " input.readMessageEnd();" << endl << indent() << " var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);" << endl - << indent() << " output.writeMessageBegin(r.fname, Thrift.MessageType.Exception, r.rseqid);" << endl + << indent() << " output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);" << endl << indent() << " x.write(output);" << endl << indent() << " output.writeMessageEnd();" << endl << indent() << " output.flush();" << endl