From 644c7b372ab61ad600817a4945a96f2bfb0f76e2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 14 Oct 2010 14:06:48 +0200 Subject: Error out if generating parser/serializer for customized type --- xsde/xsde.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'xsde/xsde.cxx') diff --git a/xsde/xsde.cxx b/xsde/xsde.cxx index 476869e..9695208 100644 --- a/xsde/xsde.cxx +++ b/xsde/xsde.cxx @@ -907,11 +907,20 @@ main (Int argc, Char* argv[]) if (gen_serializer) CXX::Serializer::Generator::process_names (*s_ops, s, f); - if (gen_hybrid && gen_parser) - CXX::Hybrid::Generator::process_parser_names (*h_ops, s, f); + try + { + if (gen_hybrid && gen_parser) + CXX::Hybrid::Generator::process_parser_names (*h_ops, s, f); - if (gen_hybrid && gen_serializer) - CXX::Hybrid::Generator::process_serializer_names (*h_ops, s, f); + if (gen_hybrid && gen_serializer) + CXX::Hybrid::Generator::process_serializer_names (*h_ops, s, f); + } + catch (CXX::Hybrid::Generator::Failed const&) + { + // Diagnostics has already been issued. + // + return 1; + } } } else -- cgit v1.1