You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2011/10/07 02:04:56 UTC

svn commit: r1179903 - /thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc

Author: jfarrell
Date: Fri Oct  7 00:04:56 2011
New Revision: 1179903

URL: http://svn.apache.org/viewvc?rev=1179903&view=rev
Log:
Thrift-1373: Fix user-defined exception generation in thrift (python)
Client: py
Patch: Dave Watson

Fixed python code generation so that user-defined exceptions have a
base class of TException rather than Exception.


Modified:
    thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc

Modified: thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc?rev=1179903&r1=1179902&r2=1179903&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc Fri Oct  7 00:04:56 2011
@@ -634,7 +634,7 @@ void t_py_generator::generate_py_struct_
     if (gen_dynamic_) {
       out << "(" << gen_dynbaseclass_exc_ << ")";
     } else {
-      out << "(Exception)";
+      out << "(TException)";
     }
   } else {
     if (gen_newstyle_) {