THRIFT-1907 Compiling namespace and sub-namespace directives for unrecognized generators should only be a warning
Patch: Andrew Cox
diff --git a/compiler/cpp/src/parse/t_program.h b/compiler/cpp/src/parse/t_program.h
index 12fcf0e..dfd9d43 100644
--- a/compiler/cpp/src/parse/t_program.h
+++ b/compiler/cpp/src/parse/t_program.h
@@ -188,7 +188,8 @@
if (sub_index != std::string::npos) {
std::string sub_namespace = language.substr(sub_index+1);
if ( ! it->second->is_valid_namespace(sub_namespace)) {
- throw base_language + " generator does not accept '" + sub_namespace + "' as sub-namespace!";
+ std::string warning = base_language + " generator does not accept '" + sub_namespace + "' as sub-namespace!";
+ pwarning(1, warning.c_str());
}
}
}