THRIFT-2340 Generated server implementation does not send response type EXCEPTION on the Thrift.TApplicationExceptionType.UNKNOWN_METHOD exception

Patch: Tomasz A. Biczel
This commit is contained in:
Jens Geyer 2014-02-01 03:58:40 +01:00
parent 813749dc50
commit 483d791f64

View File

@ -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