aboutsummaryrefslogtreecommitdiff
path: root/xsde/xsde.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-03-16 08:16:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-03-16 08:16:43 +0200
commitbce9d5a76072ec697ef69021818aa68709036da5 (patch)
tree9ec56eff60abacaea121d1602a1e48388ca34216 /xsde/xsde.cxx
parentbe19f3aae4e16b4dc9c980cb9b53e807616662ef (diff)
Add support for type customization in C++/Hybrid
examples/cxx/hybrid/custom/wildcard/: new example
Diffstat (limited to 'xsde/xsde.cxx')
-rw-r--r--xsde/xsde.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/xsde/xsde.cxx b/xsde/xsde.cxx
index acbc5db..97224ca 100644
--- a/xsde/xsde.cxx
+++ b/xsde/xsde.cxx
@@ -704,7 +704,16 @@ main (Int argc, Char* argv[])
// Calculate type sizes.
//
if (gen_hybrid)
- CXX::Hybrid::Generator::calculate_size (*h_ops, *schema, tu);
+ {
+ try
+ {
+ CXX::Hybrid::Generator::calculate_size (*h_ops, *schema, tu);
+ }
+ catch (CXX::Hybrid::Generator::Failed const&)
+ {
+ return 1; // Diagnostic has already been issued.
+ }
+ }
// Try to rearrange definitions so that there is no forward
// inheritance.
@@ -913,7 +922,16 @@ main (Int argc, Char* argv[])
// Calculate type sizes.
//
if (gen_hybrid)
- CXX::Hybrid::Generator::calculate_size (*h_ops, *schema, "");
+ {
+ try
+ {
+ CXX::Hybrid::Generator::calculate_size (*h_ops, *schema, "");
+ }
+ catch (CXX::Hybrid::Generator::Failed const&)
+ {
+ return 1; // Diagnostic has already been issued.
+ }
+ }
// Normalize and annotate complex content restrictions.
//