You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2014/02/01 03:59:15 UTC

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

Updated Branches:
  refs/heads/master 813749dc5 -> 483d791f6


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

Patch: Tomasz A. Biczel


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/483d791f
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/483d791f
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/483d791f

Branch: refs/heads/master
Commit: 483d791f64f0cddf765c2ea991cdbe8fda787e91
Parents: 813749d
Author: Jens Geyer <je...@apache.org>
Authored: Sat Feb 1 03:58:40 2014 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Sat Feb 1 03:58:40 2014 +0100

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_js_generator.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/483d791f/compiler/cpp/src/generate/t_js_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_js_generator.cc b/compiler/cpp/src/generate/t_js_generator.cc
index 7c42c01..c9ad467 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