From 06dbb8f011d2deccb66266ca45f8ea1a2f84ffb1 Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Tue, 7 Jan 2014 22:29:50 -0500 Subject: [PATCH] THRIFT-2211:Exception constructor does not contain namespace prefix Client: cocoa Patch: Jan Brauer Prefixed cocoa exceptions with set namespace. --- compiler/cpp/src/generate/t_cocoa_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cpp/src/generate/t_cocoa_generator.cc b/compiler/cpp/src/generate/t_cocoa_generator.cc index b917a144..e4980325 100644 --- a/compiler/cpp/src/generate/t_cocoa_generator.cc +++ b/compiler/cpp/src/generate/t_cocoa_generator.cc @@ -733,7 +733,7 @@ void t_cocoa_generator::generate_cocoa_struct_implementation(ofstream &out, if (is_exception) { out << indent() << "- (id) init" << endl; scope_up(out); - out << indent() << "return [super initWithName: @\"" << tstruct->get_name() << + out << indent() << "return [super initWithName: @\"" << cocoa_prefix_ << tstruct->get_name() << "\" reason: @\"unknown\" userInfo: nil];" << endl; scope_down(out); out << endl; @@ -1175,7 +1175,7 @@ void t_cocoa_generator::generate_cocoa_struct_description(ofstream& out, out << indent() << "NSMutableString * ms = [NSMutableString stringWithString: @\"" << - tstruct->get_name() << "(\"];" << endl; + cocoa_prefix_ << tstruct->get_name() << "(\"];" << endl; const vector& fields = tstruct->get_members(); vector::const_iterator f_iter; -- 2.17.1