summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation.cpp19
2 files changed, 22 insertions, 5 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_exception.cpp b/TAO/TAO_IDL/be/be_visitor_exception.cpp
index 4e635804a32..63bf273dca6 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception.cpp
@@ -488,6 +488,14 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
*os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" <<
node->flatname () << ";\n\n";
+ // generate the _alloc method
+ os->indent ();
+ *os << "static CORBA::Exception *" << node->flatname ()
+ << "_alloc (void)" << be_nl;
+ *os << "{" << be_idt_nl;
+ *os << "return new " << node->name () << ";" << be_uidt_nl;
+ *os << "}\n\n";
+
node->cli_stub_gen (I_TRUE);
}
diff --git a/TAO/TAO_IDL/be/be_visitor_operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation.cpp
index 63092b98f56..0c75e993f6a 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation.cpp
@@ -345,7 +345,7 @@ be_visitor_operation_cs::visit_operation (be_operation *node)
if (node->exceptions ())
{
*os << node->exceptions ()->length ()
- << ", _tao_" << node->flatname () << "_exceptlist};\n\n";
+ << ", _tao_" << node->flatname () << "_exceptiondata};\n\n";
}
else
*os << "0, 0};\n\n";
@@ -3207,8 +3207,13 @@ be_visitor_operation_exceptlist_cs::visit_operation (be_operation *node)
if (node->exceptions ())
{
os->indent ();
- *os << "CORBA::TypeCode_ptr " << "_tao_" << node->flatname ()
+#if 0
+ *os << "static CORBA::TypeCode_ptr " << "_tao_" << node->flatname ()
<< "_exceptlist [] = {" << be_idt_nl;
+#endif
+ *os << "static TAO_Exception_Data " << "_tao_" << node->flatname ()
+ << "_exceptiondata [] = " << be_nl;
+ *os << "{" << be_idt_nl;
// initialize an iterator to iterate thru the exception list
UTL_ExceptlistActiveIterator *ei;
ACE_NEW_RETURN (ei,
@@ -3228,12 +3233,16 @@ be_visitor_operation_exceptlist_cs::visit_operation (be_operation *node)
"codegen for scope failed\n"), -1);
}
- os->indent ();
+ *os << "{";
*os << excp->tc_name ();
-
+ *os << ", ";
+ *os << excp->flatname () << "_alloc}";
ei->next ();
if (!ei->is_done ())
- *os << ",\n";
+ {
+ *os << ",\n";
+ os->indent ();
+ }
// except the last one is processed?
} // end of while loop