You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by br...@apache.org on 2009/02/07 18:17:44 UTC

svn commit: r741917 - /incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc

Author: bryanduxbury
Date: Sat Feb  7 17:17:43 2009
New Revision: 741917

URL: http://svn.apache.org/viewvc?rev=741917&view=rev
Log:
THRIFT-159. csharp: Compiler doesn't add package scope to exceptions in catch blocks and assigns to unused local var when reading

Modified:
    incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc?rev=741917&r1=741916&r2=741917&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc Sat Feb  7 17:17:43 2009
@@ -478,7 +478,7 @@
 
   indent(out) <<
     "TField field;" << endl <<
-    indent() << "TStruct struc = iprot.ReadStructBegin();" << endl;
+    indent() << "iprot.ReadStructBegin();" << endl;
 
   indent(out) <<
     "while (true)" << endl;
@@ -1138,7 +1138,7 @@
     indent_down();
     f_service_ << indent() << "}";
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
-      f_service_ << " catch (" << (*x_iter)->get_type()->get_name() << " " << (*x_iter)->get_name() << ") {" << endl;
+      f_service_ << " catch (" << type_name((*x_iter)->get_type(), false, false) << " " << (*x_iter)->get_name() << ") {" << endl;
       if (!tfunction->is_async()) {
         indent_up();
         f_service_ <<