mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-06 18:35:19 +00:00
THRIFT-1907 Compiling namespace and sub-namespace directives for unrecognized generators should only be a warning
Patch: Andrew Cox
This commit is contained in:
parent
744e45f3b6
commit
d28d4d5784
@ -188,7 +188,8 @@ class t_program : public t_doc {
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,12 @@ namespace go ThriftTest
|
||||
namespace php ThriftTest
|
||||
namespace delphi Thrift.Test
|
||||
namespace cocoa ThriftTest
|
||||
|
||||
// Presence of namespaces and sub-namespaces for which there is
|
||||
// no generator should compile with warnings only
|
||||
namespace noexist ThriftTest
|
||||
namespace cpp.noexist ThriftTest
|
||||
|
||||
namespace * thrift.test
|
||||
|
||||
/**
|
||||
@ -368,4 +374,4 @@ struct StructA {
|
||||
struct StructB {
|
||||
1: optional StructA aa;
|
||||
2: required StructA ab;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user