From f837f301819d1f1661a185d1e64566e170933357 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Henrique=20Mendon=C3=A7a?= Date: Thu, 16 May 2013 21:25:18 +0200 Subject: [PATCH] Revert "THRIFT-1907 Compiling namespace and sub-namespace directives for unrecognized generators should only be a warning" This reverts commit d28d4d578470233e384ae6012d0ecfa5a8f3deba. --- compiler/cpp/src/parse/t_program.h | 3 +-- test/ThriftTest.thrift | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/compiler/cpp/src/parse/t_program.h b/compiler/cpp/src/parse/t_program.h index dfd9d43d..12fcf0e3 100644 --- a/compiler/cpp/src/parse/t_program.h +++ b/compiler/cpp/src/parse/t_program.h @@ -188,8 +188,7 @@ 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)) { - std::string warning = base_language + " generator does not accept '" + sub_namespace + "' as sub-namespace!"; - pwarning(1, warning.c_str()); + throw base_language + " generator does not accept '" + sub_namespace + "' as sub-namespace!"; } } } diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift index be000b6a..2be53fa2 100644 --- a/test/ThriftTest.thrift +++ b/test/ThriftTest.thrift @@ -35,12 +35,6 @@ 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 /** @@ -374,4 +368,4 @@ struct StructA { struct StructB { 1: optional StructA aa; 2: required StructA ab; -} +} \ No newline at end of file -- 2.17.1