From: Bryan Duxbury Date: Wed, 24 Aug 2011 20:53:03 +0000 (+0000) Subject: THRIFT-1288. cpp: Allow typedefed exceptions in throws clauses X-Git-Tag: 0.8.0~127 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=cff83579d73d6673a933fbb4379f034404804a9a;p=common%2Fthrift.git THRIFT-1288. cpp: Allow typedefed exceptions in throws clauses Patch: David Reiss git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1161271 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/generate/t_generator.h b/compiler/cpp/src/generate/t_generator.h index 24ac8401..25b532b2 100644 --- a/compiler/cpp/src/generate/t_generator.h +++ b/compiler/cpp/src/generate/t_generator.h @@ -242,6 +242,7 @@ class t_generator { return out.str(); } + public: /** * Get the true type behind a series of typedefs. */ diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc index 892ae207..175dbbe9 100644 --- a/compiler/cpp/src/main.cc +++ b/compiler/cpp/src/main.cc @@ -819,7 +819,7 @@ bool validate_throws(t_struct* throws) { const vector& members = throws->get_members(); vector::const_iterator m_iter; for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { - if (!(*m_iter)->get_type()->is_xception()) { + if (!t_generator::get_true_type((*m_iter)->get_type())->is_xception()) { return false; } }