mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
Thrift-1696:Compiler fails if namespace of an unknown language is present in the IDL
Patch: Abhishek Kona print warning instead of throwing an exception git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1389509 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
962b35309d
commit
ffb031d74e
@ -182,13 +182,14 @@ class t_program : public t_doc {
|
||||
it=my_copy.find(base_language);
|
||||
|
||||
if (it == my_copy.end()) {
|
||||
throw "No generator named '" + base_language + "' could be found!";
|
||||
}
|
||||
|
||||
std::string warning = "No generator named '" + base_language + "' could be found!";
|
||||
pwarning(1, warning.c_str());
|
||||
} else {
|
||||
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!";
|
||||
if ( ! it->second->is_valid_namespace(sub_namespace)) {
|
||||
throw base_language + " generator does not accept '" + sub_namespace + "' as sub-namespace!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user