THRIFT-2211:Exception constructor does not contain namespace prefix
Client: cocoa
Patch: Jan Brauer
Prefixed cocoa exceptions with set namespace.
diff --git a/compiler/cpp/src/generate/t_cocoa_generator.cc b/compiler/cpp/src/generate/t_cocoa_generator.cc
index b917a14..e498032 100644
--- a/compiler/cpp/src/generate/t_cocoa_generator.cc
+++ b/compiler/cpp/src/generate/t_cocoa_generator.cc
@@ -733,7 +733,7 @@
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 @@
out <<
indent() << "NSMutableString * ms = [NSMutableString stringWithString: @\"" <<
- tstruct->get_name() << "(\"];" << endl;
+ cocoa_prefix_ << tstruct->get_name() << "(\"];" << endl;
const vector<t_field*>& fields = tstruct->get_members();
vector<t_field*>::const_iterator f_iter;