summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/fixed_array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Param_Test/fixed_array.cpp')
-rw-r--r--TAO/tests/Param_Test/fixed_array.cpp115
1 files changed, 41 insertions, 74 deletions
diff --git a/TAO/tests/Param_Test/fixed_array.cpp b/TAO/tests/Param_Test/fixed_array.cpp
index 3a96fc3c5c7..9027af625e1 100644
--- a/TAO/tests/Param_Test/fixed_array.cpp
+++ b/TAO/tests/Param_Test/fixed_array.cpp
@@ -87,24 +87,11 @@ int
Test_Fixed_Array::run_sii_test (Param_Test_ptr objref,
CORBA::Environment &ACE_TRY_ENV)
{
- ACE_TRY
- {
- this->ret_ = objref->test_fixed_array (this->in_,
- this->inout_,
- this->out_,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Fixed_Array::run_sii_test\n");
-
- }
- ACE_ENDTRY;
- return -1;
+ this->ret_ = objref->test_fixed_array (this->in_,
+ this->inout_,
+ this->out_,
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
@@ -112,62 +99,42 @@ Test_Fixed_Array::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
CORBA::Environment &ACE_TRY_ENV)
{
- ACE_TRY
- {
- // We provide the top level memory
- // the Any does not own any of these
- CORBA::Any in_arg (Param_Test::_tc_Fixed_Array,
- this->in_,
- 0);
-
- CORBA::Any inout_arg (Param_Test::_tc_Fixed_Array,
- this->inout_,
- 0);
-
- CORBA::Any out_arg (Param_Test::_tc_Fixed_Array,
- this->out_,
- 0);
-
- // add parameters
- param_list->add_value ("l1",
- in_arg,
- CORBA::ARG_IN,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("l2",
- inout_arg,
- CORBA::ARG_INOUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- param_list->add_value ("l3",
- out_arg,
- CORBA::ARG_OUT,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- // add return value type
- CORBA::NamedValue *item = retval->item (0,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- item->value ()->replace (Param_Test::_tc_Fixed_Array,
- this->ret_.inout (),
- 0, // does not own
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- return 0;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Test_Fixed_Array::add_args\n");
-
- }
- ACE_ENDTRY;
- return -1;
+ // We provide the top level memory
+ // the Any does not own any of these
+ CORBA::Any in_arg (Param_Test::_tc_Fixed_Array,
+ this->in_,
+ 0);
+
+ CORBA::Any inout_arg (Param_Test::_tc_Fixed_Array,
+ this->inout_,
+ 0);
+
+ CORBA::Any out_arg (Param_Test::_tc_Fixed_Array,
+ this->out_,
+ 0);
+
+ // add parameters
+ param_list->add_value ("l1",
+ in_arg,
+ CORBA::ARG_IN,
+ ACE_TRY_ENV);
+
+ param_list->add_value ("l2",
+ inout_arg,
+ CORBA::ARG_INOUT,
+ ACE_TRY_ENV);
+
+ param_list->add_value ("l3",
+ out_arg,
+ CORBA::ARG_OUT,
+ ACE_TRY_ENV);
+
+ // add return value type
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Fixed_Array,
+ this->ret_.inout (),
+ 0, // does not own
+ ACE_TRY_ENV);
+ return 0;
}
CORBA::Boolean