summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_operation/operation.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation.cpp73
1 files changed, 66 insertions, 7 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
index 068ec07b360..a76bcfc4f49 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
@@ -315,6 +315,64 @@ be_visitor_operation::gen_raise_exception (be_type *return_type,
}
int
+be_visitor_operation::gen_check_exception (be_type *return_type)
+{
+ TAO_OutStream *os = this->ctx_->stream ();
+
+ if (return_type == 0 || this->void_return_type (return_type))
+ {
+ *os << "ACE_CHECK;" << be_nl;
+ return 0;
+ }
+
+ // Non-void return type....
+ *os << "ACE_CHECK_RETURN (";
+ be_visitor_context ctx (*this->ctx_);
+ be_visitor_operation_rettype_return_cs visitor (&ctx);
+
+ if (return_type->accept (&visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_operation::"
+ "gen_check_exception - "
+ "codegen for return var failed\n"),
+ -1);
+ }
+
+ *os << ");" << be_nl;
+ return 0;
+}
+
+int
+be_visitor_operation::gen_check_interceptor_exception (be_type *return_type)
+{
+ TAO_OutStream *os = this->ctx_->stream ();
+
+ if (return_type == 0 || this->void_return_type (return_type))
+ {
+ *os << "TAO_INTERCEPTOR_CHECK;\n";
+ return 0;
+ }
+
+ // Non-void return type.
+ *os << "TAO_INTERCEPTOR_CHECK_RETURN (";
+ be_visitor_context ctx (*this->ctx_);
+ be_visitor_operation_rettype_return_cs visitor (&ctx);
+
+ if (return_type->accept (&visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_operation::"
+ "gen_check_exception - "
+ "codegen for return var failed\n"),
+ -1);
+ }
+
+ *os << ");\n";
+ return 0;
+}
+
+int
be_visitor_operation::gen_stub_operation_body (
be_operation *node,
be_type *return_type
@@ -470,23 +528,24 @@ be_visitor_operation::gen_stub_operation_body (
*os << "_tao_call.invoke (" << be_idt << be_idt_nl
<< "_tao_" << node->flat_name ()
<< "_exceptiondata," << be_nl
- << node->exceptions ()->length () << env_arg << be_uidt_nl
+ << node->exceptions ()->length () << be_nl
+ << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl
<< ");" << be_uidt;
}
else
{
- *os << "_tao_call.invoke (0, 0"
- << (be_global->use_raw_throw () ? "" : " ACE_ENV_ARG_PARAMETER")
- << ");";
+ *os << "_tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);";
}
+ *os << be_nl;
+
if (this->void_return_type (return_type))
{
- *os << TAO_ACE_CHECK ();
+ *os << "ACE_CHECK;";
}
else
{
- *os << TAO_ACE_CHECK ("_tao_retval.excp ()");
+ *os << "ACE_CHECK_RETURN (_tao_retval.excp ());";
}
if (!this->void_return_type (return_type))
@@ -574,7 +633,7 @@ be_visitor_operation::gen_raise_interceptor_exception (
void
be_visitor_operation::gen_stub_body_arglist (be_operation *node,
TAO_OutStream *os,
- bool ami)
+ idl_bool ami)
{
AST_Argument *arg = 0;
UTL_ScopeActiveIterator arg_decl_iter (node, UTL_Scope::IK_decls);