THRIFT-2340 Generated server implementation does not send response type EXCEPTION...
authorJens Geyer <jensg@apache.org>
Sat, 1 Feb 2014 02:58:40 +0000 (03:58 +0100)
committerJens Geyer <jensg@apache.org>
Sat, 1 Feb 2014 02:58:40 +0000 (03:58 +0100)
Patch: Tomasz A. Biczel

compiler/cpp/src/generate/t_js_generator.cc

index 7c42c01..c9ad467 100644 (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