summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a41
-rw-r--r--TAO/TAO_IDL/be/be_visitor_factory.cpp1
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp1
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp1
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp82
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp132
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp42
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp47
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation.cpp98
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/remote_proxy_impl_cs.cpp96
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp29
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp29
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/ami_cs.h9
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_cs.h9
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h3
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h3
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/operation.h11
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/remote_proxy_impl_cs.h18
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h5
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h3
21 files changed, 143 insertions, 529 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 24793342395..8257af9b439 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,42 @@
+Tue Jan 22 15:32:10 2002 Carlos O'Ryan <coryan@uci.edu>
+
+ * TAO_IDL/be_include/be_visitor_operation/operation.h:
+ * TAO_IDL/be/be_visitor_operation/operation.cpp:
+ * TAO_IDL/be/be_visitor_factory.cpp:
+ * TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp:
+ * TAO_IDL/be/be_visitor_operation/amh_ss.cpp:
+ * TAO_IDL/be/be_visitor_operation/ami_cs.cpp:
+ * TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp:
+ * TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp:
+ * TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp:
+ * TAO_IDL/be/be_visitor_operation/operation_ss.cpp:
+ * TAO_IDL/be/be_visitor_operation/remote_proxy_impl_cs.cpp:
+ * TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp:
+ * TAO_IDL/be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp:
+ * TAO_IDL/be_include/be_visitor_operation/ami_cs.h:
+ * TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_cs.h:
+ * TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h:
+ * TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h:
+ * TAO_IDL/be_include/be_visitor_operation/remote_proxy_impl_cs.h:
+ * TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h:
+ * TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h:
+ I found multiple copies of the following routines:
+ gen_raise_exception(): generate the code to raise exceptions
+ using either 'throw', 'ACE_THROW' or 'ACE_THROW_RETURN'.
+ gen_check_interceptor_exception(): generate the code to check
+ for exceptions (in interceptors) using either
+ 'TAO_INTERCEPTOR_CHECK or 'TAO_INTERCEPTOR_CHECK_RETURN_RETURN'.
+ gen_check_exception(): generate the code to check
+ for exceptions (in interceptors) using either 'ACE_CHECK' or
+ 'ACE_CHECK_RETURN'.
+ Interestingly the implementations of these routines were all
+ slightly different, for example, some did not deal with non-void
+ routines properly, while others did not deal with the
+ use_raw_throw() IDL-compiler option.
+ The changes were motivated by some Borland warnings, another
+ lesson on why we need to keep looking at warnings carefully, and
+ not simply shut them up using some hack.
+
Tue Jan 22 13:36:05 2002 Ossama Othman <ossama@uci.edu>
* tao/ClientRequestInfo_i.h (~TAO_ClientRequestInfo_i):
@@ -20,7 +59,7 @@ Tue Jan 22 12:42:13 2002 Venkita Subramonian <venkita@cs.wustl.edu>
* performance-tests/Cubit/TAO/MT_Cubit/Makefile:
* performance-tests/Cubit/TAO/IDL_Cubit/Makefile:
Regenerated dependencies.
-
+
Tue Jan 22 12:25:31 2002 Jeff Parsons <parsons@cs.wustl.edu>
* tests/Strategies/simple_test.idl:
diff --git a/TAO/TAO_IDL/be/be_visitor_factory.cpp b/TAO/TAO_IDL/be/be_visitor_factory.cpp
index 3cb6ca1abe4..20b88782b2a 100644
--- a/TAO/TAO_IDL/be/be_visitor_factory.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_factory.cpp
@@ -794,4 +794,3 @@ TAO_Compiled_Visitor_Factory::make_visitor (be_visitor_context *ctx)
return TAO_COMMON_VISITOR_FACTORY::instance ()->make_visitor (ctx);
}
}
-
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp
index b6d5fc3c1de..015cc1c1c85 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp
@@ -151,7 +151,6 @@ be_visitor_amh_rh_operation_ss::marshal_params (be_operation *node)
// If marshaling fails, raise exception.
if (this->gen_raise_exception (0,
"CORBA::MARSHAL",
- "",
"") == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
index d4763415245..dc2728eaca8 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp
@@ -190,7 +190,6 @@ be_visitor_amh_operation_ss::demarshal_params (be_operation *node)
// If marshaling fails, raise exception.
if (this->gen_raise_exception (0,
"CORBA::MARSHAL",
- "",
"") == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
index 3375400ad79..c99aced2cbe 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
@@ -239,88 +239,6 @@ be_visitor_operation_ami_cs::visit_argument (be_argument *node)
return 0;
}
-int
-be_visitor_operation_ami_cs::gen_raise_exception (be_type *bt,
- const char *excep,
- const char *completion_status)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_visitor *visitor;
- be_visitor_context ctx;
-
- if (this->void_return_type (bt))
- {
- if (be_global->use_raw_throw ())
- *os << "throw ";
- else
- *os << "ACE_THROW (";
-
- *os << excep << " (" << completion_status << ")";
-
- if (be_global->use_raw_throw ())
- *os << ";\n";
- else
- *os << ");\n";
- }
- else
- {
- *os << "ACE_THROW_RETURN ("
- << excep << " (" << completion_status << "), ";
-
- // return the appropriate return value
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_cs::"
- "gen_raise_exception - "
- "codegen for return var failed\n"),
- -1);
- }
- *os << ");\n";
- }
- return 0;
-}
-
-int
-be_visitor_operation_ami_cs::gen_check_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_visitor *visitor;
- be_visitor_context ctx;
-
- os->indent ();
- // check if there is an exception
- if (this->void_return_type (bt))
- {
- *os << "ACE_CHECK;\n";
- }
- else
- {
- *os << "ACE_CHECK_RETURN (";
-
- // return the appropriate return value
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_cs::"
- "gen_check_exception - "
- "codegen failed\n"),
- -1);
- }
- *os << ");\n";
- }
-
- return 0;
-}
-
// ************************************************************
// Operation visitor for interpretive client stubs
// ************************************************************
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp
index 20e0acfc094..599429e8e43 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_reply_stub_operation_cs.cpp
@@ -310,138 +310,6 @@ be_visitor_operation_ami_handler_reply_stub_operation_cs::visit_argument (be_arg
return 0;
}
-int
-be_visitor_operation_ami_handler_reply_stub_operation_cs::gen_raise_exception (
- be_type *bt,
- const char *excep,
- const char *completion_status
- )
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_visitor *visitor;
- be_visitor_context ctx;
-
- if (this->void_return_type (bt))
- {
- if (be_global->use_raw_throw ())
- *os << "throw ";
- else
- *os << "ACE_THROW (";
-
- *os << excep << " (" << completion_status << ")";
-
- if (be_global->use_raw_throw ())
- *os << ";\n";
- else
- *os << ");\n";
- }
- else
- {
- *os << "ACE_THROW_RETURN ("
- << excep << " (" << completion_status << "), ";
-
- // return the appropriate return value
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((
- LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_reply_stub_operation_cs::"
- "gen_raise_exception - "
- "codegen for return var failed\n"
- ),
- -1
- );
- }
- *os << ");\n";
- }
- return 0;
-}
-
-int
-be_visitor_operation_ami_handler_reply_stub_operation_cs::gen_check_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_visitor *visitor;
- be_visitor_context ctx;
-
- os->indent ();
- // check if there is an exception
- if (this->void_return_type (bt))
- {
- *os << "ACE_CHECK;\n";
- }
- else
- {
- *os << "ACE_CHECK_RETURN (";
-
- // return the appropriate return value
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ami_handler_reply_stub_operation_cs::"
- "gen_check_exception - "
- "codegen failed\n"),
- -1);
- }
- *os << ");\n";
- }
-
- return 0;
-}
-
-// Currently we do not support interpretative exception handling for AMI
-#if 0
-
-
-// ************************************************************
-// Operation visitor for interpretive client skeletons of the AMI reply handler
-// ************************************************************
-
-be_interpretive_visitor_operation_ami_handler_reply_stub_operation_cs::
-be_interpretive_visitor_operation_ami_handler_reply_stub_operation_cs (be_visitor_context *ctx)
- : be_visitor_operation_ami_handler_reply_stub_operation_cs (ctx)
-{
-}
-
-be_interpretive_visitor_operation_ami_handler_reply_stub_operation_cs::~be_interpretive_visitor_operation_ami_handler_reply_stub_operation_cs (void)
-{
-}
-
-// concrete implementation of the template methods
-
-int
-be_interpretive_visitor_operation_ami_handler_reply_stub_operation_cs::gen_pre_stub_info (be_operation *node,
- be_type *bt)
-{
- ACE_UNUSED_ARG (node);
- ACE_UNUSED_ARG (bt);
-
- // @@ Michael: To be done.
- return 0;
-}
-
-int
-be_interpretive_visitor_operation_ami_handler_reply_stub_operation_cs::
-gen_marshal_and_invoke (be_operation*node,
- be_type *bt)
-{
- ACE_UNUSED_ARG (node);
- ACE_UNUSED_ARG (bt);
-
- // @@ Michael: To be done.
- return 0;
-}
-
-#endif /* 0 */
-
// ************************************************************
// Operation visitor for compiled client skeletons of the AMI reply handler
// ************************************************************
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp
index e38d56d8272..a253d39b1e7 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/direct_collocated_ss.cpp
@@ -18,9 +18,9 @@
//
// ============================================================================
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
+#include "idl.h"
+#include "idl_extern.h"
+#include "be.h"
#include "be_visitor_operation.h"
@@ -175,42 +175,6 @@ int be_visitor_operation_direct_collocated_ss::gen_invoke (be_visitor_context &c
}
int
-be_visitor_operation_direct_collocated_ss::gen_check_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_visitor *visitor;
- be_visitor_context ctx;
-
- os->indent ();
- // check if there is an exception
- if (!this->void_return_type (bt))
- {
- *os << "ACE_CHECK_RETURN (";
-
- // return the appropriate return value
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_direct_collocated_cs::"
- "gen_check_exception - "
- "codegen failed\n"),
- -1);
- }
- *os << ");\n";
- }
- else
- {
- *os << "ACE_CHECK;\n";
- }
-
- return 0;
-}
-
-int
be_visitor_operation_direct_collocated_ss::void_return_type (be_type *bt)
{
// is the operation return type void?
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp
index 64b7e6587ad..9b24f4fa611 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp
@@ -1,6 +1,8 @@
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
+// $Id$
+
+#include "idl.h"
+#include "idl_extern.h"
+#include "be.h"
#include "be_visitor_operation.h"
@@ -133,7 +135,7 @@ be_visitor_operation_direct_proxy_impl_ss::visit_operation (be_operation *node)
int
be_visitor_operation_direct_proxy_impl_ss::gen_invoke (be_visitor_context &ctx,
- be_operation *node)
+ be_operation *node)
{
TAO_OutStream *os = this->ctx_->stream ();
@@ -159,43 +161,6 @@ be_visitor_operation_direct_proxy_impl_ss::gen_invoke (be_visitor_context &ctx,
return 0;
}
-
-int
-be_visitor_operation_direct_proxy_impl_ss::gen_check_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
- be_visitor *visitor;
- be_visitor_context ctx;
-
- os->indent ();
- // check if there is an exception
- if (!this->void_return_type (bt))
- {
- *os << "ACE_CHECK_RETURN (";
-
- // return the appropriate return value
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_direct_collocated_cs::"
- "gen_check_exception - "
- "codegen failed\n"),
- -1);
- }
- *os << ");\n";
- }
- else
- {
- *os << "ACE_CHECK;\n";
- }
-
- return 0;
-}
-
int
be_visitor_operation_direct_proxy_impl_ss::void_return_type (be_type *bt)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
index 95fffeefd59..219c359562b 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
@@ -238,63 +238,113 @@ be_visitor_operation::gen_environment_var ()
}
int
-be_visitor_operation::gen_raise_exception (be_type *,
- const char *excep,
- const char *completion_status,
- const char * /* env */)
+be_visitor_operation::gen_raise_exception (be_type *return_type,
+ const char *exception_name,
+ const char *exception_arguments)
{
TAO_OutStream *os = this->ctx_->stream ();
os->indent ();
-
if (be_global->use_raw_throw ())
{
- *os << "throw ";
+ *os << "throw "
+ << exception_name << "(" << exception_arguments << ");\n";
+ return 0;
}
- else
+
+ if (return_type == 0 || this->void_return_type (return_type))
{
*os << "ACE_THROW (";
}
-
- *os << excep << "(" << completion_status << ")";
-
- if (be_global->use_raw_throw ())
+ else
{
- *os << ";\n";
+ *os << "ACE_THROW_RETURN (";
}
- else
+ *os << exception_name << " (" << exception_arguments << ")";
+
+ if (this->void_return_type (return_type))
{
*os << ");\n";
+ return 0;
}
+ *os << "," << be_nl;
+
+ // Non-void return type....
+ be_visitor_context ctx (*this->ctx_);
+ ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
+
+ 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_raise_exception - "
+ "codegen for return var failed\n"),
+ -1);
+ }
+ *os << ");\n";
return 0;
}
int
-be_visitor_operation::gen_check_exception (be_type *,
- const char * /* env */)
+be_visitor_operation::gen_check_exception (be_type *return_type)
{
TAO_OutStream *os = this->ctx_->stream ();
-
os->indent ();
- // Check if there is an exception.
- *os << "ACE_CHECK;\n";
+ if (return_type == 0 || this->void_return_type (return_type))
+ {
+ *os << "ACE_CHECK;\n";
+ return 0;
+ }
+
+ // Non-void return type....
+ *os << "ACE_CHECK_RETURN (";
+ be_visitor_context ctx (*this->ctx_);
+ ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
+
+ 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_check_interceptor_exception (be_type *,
- const char * /* env */)
+be_visitor_operation::gen_check_interceptor_exception (be_type *return_type)
{
TAO_OutStream *os = this->ctx_->stream ();
-
os->indent ();
- // Check if there is an exception.
- *os << "TAO_INTERCEPTOR_CHECK;\n";
+ 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_);
+ ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
+
+ 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;
}
-
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
index b5791b226c5..7d3526f16c8 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
@@ -585,9 +585,9 @@ be_visitor_operation_ss::gen_demarshal_params (be_operation *node,
*os << be_uidt_nl << "))\n" << be_idt;
// If marshaling fails, raise exception.
- if (this->gen_raise_exception (bt, "CORBA::MARSHAL",
- "",
- "ACE_TRY_ENV") == -1)
+ if (this->gen_raise_exception (bt,
+ "CORBA::MARSHAL",
+ "") == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_compiled_visitor_operation_ss::"
@@ -715,9 +715,9 @@ be_visitor_operation_ss::gen_marshal_params (be_operation *node,
*os << be_uidt_nl << "))\n";
// if marshaling fails, raise exception
- if (this->gen_raise_exception (bt, "CORBA::MARSHAL",
- "",
- "ACE_TRY_ENV") == -1)
+ if (this->gen_raise_exception (bt,
+ "CORBA::MARSHAL",
+ "") == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_compiled_visitor_operation_ss::"
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/remote_proxy_impl_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/remote_proxy_impl_cs.cpp
index d9c4b8b3ea4..13904d6a4c4 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/remote_proxy_impl_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/remote_proxy_impl_cs.cpp
@@ -150,7 +150,8 @@ be_visitor_operation_remote_proxy_impl_cs::visit_operation (be_operation *node)
if (node->has_native ()) // native exists => no stub
{
- if (this->gen_raise_exception (bt, "CORBA::MARSHAL",
+ if (this->gen_raise_exception (bt,
+ "CORBA::MARSHAL",
"") == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -169,7 +170,8 @@ be_visitor_operation_remote_proxy_impl_cs::visit_operation (be_operation *node)
<< "if (istub == 0)" << be_idt_nl;
// if the stub object was bad, then we raise a system exception
- if (this->gen_raise_exception (bt, "CORBA::INTERNAL",
+ if (this->gen_raise_exception (bt,
+ "CORBA::INTERNAL",
"") == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -928,44 +930,6 @@ be_visitor_operation_remote_proxy_impl_cs::gen_marshal_and_invoke (
}
int
-be_visitor_operation_remote_proxy_impl_cs::gen_raise_exception (be_type *bt,
- const char *excep,
- const char *completion_status)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- if (this->void_return_type (bt))
- {
- if (be_global->use_raw_throw ())
- *os << "throw ";
- else
- *os << "ACE_THROW (";
-
- *os << excep << " (" << completion_status << ")";
-
- if (be_global->use_raw_throw ())
- *os << ";\n";
- else
- *os << ");\n";
- }
- else
- {
- if (bt->size_type () == be_decl::VARIABLE
- || bt->base_node_type () == AST_Decl::NT_array)
- {
- *os << "ACE_THROW_RETURN (" << excep
- << " (" << completion_status << "), 0);\n";
- }
- else
- {
- *os << "ACE_THROW_RETURN (" << excep
- << " (" << completion_status << "), _tao_retval);\n";
- }
- }
- return 0;
-}
-
-int
be_visitor_operation_remote_proxy_impl_cs::gen_raise_interceptor_exception (be_type *bt,
const char *excep,
const char *completion_status)
@@ -1008,58 +972,6 @@ be_visitor_operation_remote_proxy_impl_cs::gen_raise_interceptor_exception (be_t
return 0;
}
-int
-be_visitor_operation_remote_proxy_impl_cs::gen_check_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- // check if there is an exception
- if (this->void_return_type (bt))
- {
- *os << "ACE_CHECK;" << be_nl;
- }
- else
- {
- if (bt->size_type () == be_decl::VARIABLE
- || bt->base_node_type () == AST_Decl::NT_array)
- {
- *os << "ACE_CHECK_RETURN (0);" << be_nl;
- }
- else
- {
- *os << "ACE_CHECK_RETURN (_tao_retval);" << be_nl;
- }
- }
-
- return 0;
-}
-
-int
-be_visitor_operation_remote_proxy_impl_cs::gen_check_interceptor_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- // Check if there is an exception.
- if (this->void_return_type (bt))
- {
- *os << "TAO_INTERCEPTOR_CHECK;" << be_nl;
- }
- else
- {
- if (bt->size_type () == be_decl::VARIABLE
- || bt->base_node_type () == AST_Decl::NT_array)
- {
- *os << "TAO_INTERCEPTOR_CHECK_RETURN (0);" << be_nl;
- }
- else
- {
- *os << "TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval);" << be_nl;
- }
- }
-
- return 0;
-}
-
const char*
be_visitor_operation_remote_proxy_impl_cs::compute_operation_name (be_operation *node)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp
index 6dde06d632b..eb09538510f 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_collocated_ss.cpp
@@ -35,7 +35,7 @@ ACE_RCSID(be_visitor_operation, thru_poa_collocated_ss, "$Id$")
be_visitor_operation_thru_poa_collocated_ss::be_visitor_operation_thru_poa_collocated_ss
(be_visitor_context *ctx)
- : be_visitor_scope (ctx)
+ : be_visitor_operation (ctx)
{
}
@@ -253,33 +253,6 @@ int be_visitor_operation_thru_poa_collocated_ss::gen_invoke (
}
int
-be_visitor_operation_thru_poa_collocated_ss::gen_check_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->indent ();
- // check if there is an exception
- if (!this->void_return_type (bt))
- {
- if (bt->size_type () == be_decl::VARIABLE
- || bt->base_node_type () == AST_Decl::NT_array)
- {
- *os << "ACE_CHECK_RETURN (0);\n";
- }
- else
- {
- *os << "ACE_CHECK_RETURN (_tao_retval);\n";
- }
- }
- else
- {
- *os << "ACE_CHECK;\n";
- }
-
- return 0;
-}
-
-int
be_visitor_operation_thru_poa_collocated_ss::void_return_type (be_type *bt)
{
// is the operation return type void?
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp
index 018da5f23f1..2b632c91905 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp
@@ -252,35 +252,6 @@ be_visitor_operation_thru_poa_proxy_impl_ss::gen_invoke (
return 0;
}
-
-int
-be_visitor_operation_thru_poa_proxy_impl_ss::gen_check_exception (be_type *bt)
-{
- TAO_OutStream *os = this->ctx_->stream ();
-
- os->indent ();
- // check if there is an exception
- if (!this->void_return_type (bt))
- {
- if (bt->size_type () == be_decl::VARIABLE
- || bt->base_node_type () == AST_Decl::NT_array)
- {
- *os << "ACE_CHECK_RETURN (0);" << be_nl;
- }
- else
- {
- *os << "ACE_CHECK_RETURN (_tao_retval);" << be_nl;
- }
- }
- else
- {
- *os << "ACE_CHECK;" << be_nl;
- }
-
- return 0;
-}
-
-
int
be_visitor_operation_thru_poa_proxy_impl_ss::void_return_type (be_type *bt)
{
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_cs.h
index 40208d792ea..dd581cf58f0 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_cs.h
@@ -58,15 +58,6 @@ public:
// =helper
virtual int post_process (be_decl *);
// stuff to output after every member of the scope is handled
-
- virtual int gen_raise_exception (be_type *,
- const char * excep,
- const char * status);
- // helper that generates code for raising an exception
-
- virtual int gen_check_exception (be_type *);
- // helper that generates code for checking for an exception
-
};
// specialized visitors
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_cs.h
index b4caae81b1e..e692c382502 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_cs.h
@@ -60,15 +60,6 @@ public:
// =helper
virtual int post_process (be_decl *);
// stuff to output after every member of the scope is handled
-
- virtual int gen_raise_exception (be_type *,
- const char * excep,
- const char * status);
- // helper that generates code for raising an exception
-
- virtual int gen_check_exception (be_type *);
- // helper that generates code for checking for an exception
-
};
// specialized visitors
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h
index 015139b3047..c6ebe06940f 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_collocated_ss.h
@@ -50,9 +50,6 @@ public:
virtual int gen_invoke (be_visitor_context &ctx, be_operation *node);
// A helper method to generate operation invocation code.
- virtual int gen_check_exception (be_type *bt);
- // ACE_CHECK macros generator.
-
virtual int void_return_type (be_type *bt);
// is my return type void?
};
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h
index ab46cfb33c8..3d8003ed5ee 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h
@@ -44,9 +44,6 @@ public:
virtual int gen_invoke (be_visitor_context &ctx, be_operation *node);
// A helper method to generate operation invocation code.
- virtual int gen_check_exception (be_type *bt);
- // ACE_CHECK macros generator.
-
virtual int void_return_type (be_type *bt);
// is my return type void?
};
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h
index 0e4e4a419b2..76f2faa5227 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h
@@ -64,16 +64,15 @@ public:
virtual const char *gen_environment_var (void);
// generate the environment variable declaration
- virtual int gen_raise_exception (be_type *,
- const char *excep,
- const char *status,
- const char *env);
+ virtual int gen_raise_exception (be_type *return_type,
+ const char *exception_name,
+ const char *exception_arguments);
// helper that generates code for raising an exception
- virtual int gen_check_exception (be_type *, const char *env);
+ virtual int gen_check_exception (be_type *return_type);
// helper that generates code for checking for an exception
- virtual int gen_check_interceptor_exception (be_type *, const char *env);
+ virtual int gen_check_interceptor_exception (be_type *);
// helper that generates code for checking for an exception within
// an interceptor try block.
};
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/remote_proxy_impl_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/remote_proxy_impl_cs.h
index 13b0c78fb47..e71f22a1aa0 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/remote_proxy_impl_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/remote_proxy_impl_cs.h
@@ -60,24 +60,12 @@ public:
virtual int post_process (be_decl *);
// stuff to output after every member of the scope is handled
- virtual int gen_raise_exception (be_type *,
- const char *excep,
- const char *status);
- // helper that generates code for raising an exception
-
- virtual int gen_check_exception (be_type *);
- // helper that generates code for checking for an exception
-
- virtual int gen_raise_interceptor_exception (be_type *,
- const char *excep,
- const char *status);
+ virtual int gen_raise_interceptor_exception (be_type *return_type,
+ const char *exception_name,
+ const char *exception_arguments);
// helper that generates code for raising an exception within
// interceptor's try block
- virtual int gen_check_interceptor_exception (be_type *);
- // helper that generates code for checking for an exception within
- // interceptor's try block
-
virtual const char *compute_operation_name (be_operation *node);
// compute the operation_remote_proxy_impl name. Notice that this operation_remote_proxy_impl
// _does_ include the double quote.
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h
index b6566b5a15c..2c63169caea 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_collocated_ss.h
@@ -26,7 +26,7 @@
// Operation visitor for server skeletons for the thru_poa collocated class
// *****************************************************************
-class be_visitor_operation_thru_poa_collocated_ss : public be_visitor_scope
+class be_visitor_operation_thru_poa_collocated_ss : public be_visitor_operation
{
//
// = TITLE
@@ -50,9 +50,6 @@ public:
virtual int gen_invoke (be_visitor_context &ctx, be_operation *node);
// A helper method to generate operation invocation code.
- virtual int gen_check_exception (be_type *bt);
- // ACE_CHECK macros generator.
-
virtual int void_return_type (be_type *bt);
// is my return type void?
};
diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h
index e90cf91461b..3c15fd5762a 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h
@@ -49,9 +49,6 @@ public:
virtual int gen_invoke (be_visitor_context &ctx, be_operation *node);
// A helper method to generate operation invocation code.
- virtual int gen_check_exception (be_type *bt);
- // ACE_CHECK macros generator.
-
virtual int void_return_type (be_type *bt);
// is my return type void?
};