diff options
-rw-r--r-- | compiler/cpp/src/thrift/generate/t_generator.cc | 7 | ||||
-rw-r--r-- | compiler/cpp/src/thrift/parse/t_program.h | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/compiler/cpp/src/thrift/generate/t_generator.cc b/compiler/cpp/src/thrift/generate/t_generator.cc index f4b715085..3059fb141 100644 --- a/compiler/cpp/src/thrift/generate/t_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_generator.cc @@ -234,6 +234,13 @@ t_generator* t_generator_registry::get_generator(t_program* program, gen_map_t& the_map = get_generator_map(); gen_map_t::iterator iter = the_map.find(language); + if ((language == "csharp") || (language == "netcore")) { + failure("The '%s' target is no longer available. Use 'netstd' instead.", language.c_str()); + } + else if (language == "as3") { + pwarning(1, "The '%s' target is deprecated and will be removed in future Thrift versions.", language.c_str()); + } + if (iter == the_map.end()) { return nullptr; } diff --git a/compiler/cpp/src/thrift/parse/t_program.h b/compiler/cpp/src/thrift/parse/t_program.h index 5b1b8d020..140dc35d9 100644 --- a/compiler/cpp/src/thrift/parse/t_program.h +++ b/compiler/cpp/src/thrift/parse/t_program.h @@ -291,14 +291,6 @@ public: pwarning(1, "Namespace 'smalltalk' is deprecated. Use 'st' instead"); base_language = "st"; } - else if (base_language == "csharp") { - pwarning(1, "The '%s' target is no longer available. Use 'netstd' instead.", base_language.c_str()); - // warn only, don't change base_language - } - else if (base_language == "netcore") { - pwarning(1, "The '%s' target is no longer available. Use 'netstd' instead.", base_language.c_str()); - // warn only, don't change base_language - } t_generator_registry::gen_map_t my_copy = t_generator_registry::get_generator_map(); |