From 483d791f64f0cddf765c2ea991cdbe8fda787e91 Mon Sep 17 00:00:00 2001 From: Jens Geyer Date: Sat, 1 Feb 2014 03:58:40 +0100 Subject: [PATCH] THRIFT-2340 Generated server implementation does not send response type EXCEPTION on the Thrift.TApplicationExceptionType.UNKNOWN_METHOD exception Patch: Tomasz A. Biczel --- compiler/cpp/src/generate/t_js_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/cpp/src/generate/t_js_generator.cc b/compiler/cpp/src/generate/t_js_generator.cc index 7c42c0192..c9ad467fd 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