summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorbala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-16 21:40:44 +0000
committerbala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-16 21:40:44 +0000
commitcd55faec95d641f16bab06852546b2fbcb6766ee (patch)
treebd74064985135efff4fd435911566384398edadc /TAO
parent8c35832b7c0414a367c3050bcc5631286dd2801c (diff)
downloadATCD-cd55faec95d641f16bab06852546b2fbcb6766ee.tar.gz
Made them Exception safe using the ACE_TRY macros instead of the
TAO_TRY macros
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tests/Param_Test/any.cpp37
-rw-r--r--TAO/tests/Param_Test/bd_long_seq.cpp22
-rw-r--r--TAO/tests/Param_Test/bd_short_seq.cpp26
-rw-r--r--TAO/tests/Param_Test/bd_str_seq.cpp22
-rw-r--r--TAO/tests/Param_Test/bd_string.cpp30
-rw-r--r--TAO/tests/Param_Test/bd_struct_seq.cpp30
-rw-r--r--TAO/tests/Param_Test/big_union.cpp47
-rw-r--r--TAO/tests/Param_Test/client.cpp123
-rw-r--r--TAO/tests/Param_Test/driver.cpp94
-rw-r--r--TAO/tests/Param_Test/except.cpp50
-rw-r--r--TAO/tests/Param_Test/fixed_array.cpp34
-rw-r--r--TAO/tests/Param_Test/fixed_struct.cpp34
-rw-r--r--TAO/tests/Param_Test/nested_struct.cpp34
-rw-r--r--TAO/tests/Param_Test/objref.cpp236
-rw-r--r--TAO/tests/Param_Test/objref_struct.cpp92
-rw-r--r--TAO/tests/Param_Test/param_test_i.cpp73
-rw-r--r--TAO/tests/Param_Test/results.cpp4
-rwxr-xr-xTAO/tests/Param_Test/run_test.pl1
-rw-r--r--TAO/tests/Param_Test/server.cpp58
-rw-r--r--TAO/tests/Param_Test/short.cpp36
-rw-r--r--TAO/tests/Param_Test/typecode.cpp33
-rw-r--r--TAO/tests/Param_Test/ub_any_seq.cpp41
-rw-r--r--TAO/tests/Param_Test/ub_long_seq.cpp32
-rw-r--r--TAO/tests/Param_Test/ub_objref_seq.cpp104
-rw-r--r--TAO/tests/Param_Test/ub_short_seq.cpp32
-rw-r--r--TAO/tests/Param_Test/ub_str_seq.cpp32
-rw-r--r--TAO/tests/Param_Test/ub_string.cpp32
-rw-r--r--TAO/tests/Param_Test/ub_struct_seq.cpp64
-rw-r--r--TAO/tests/Param_Test/ulonglong.cpp30
-rw-r--r--TAO/tests/Param_Test/var_array.cpp31
-rw-r--r--TAO/tests/Param_Test/var_struct.cpp28
31 files changed, 770 insertions, 772 deletions
diff --git a/TAO/tests/Param_Test/any.cpp b/TAO/tests/Param_Test/any.cpp
index 3f8d8b00881..77a07bcd356 100644
--- a/TAO/tests/Param_Test/any.cpp
+++ b/TAO/tests/Param_Test/any.cpp
@@ -69,22 +69,24 @@ static const CORBA::TypeCode_ptr any_table [] =
int
Test_Any::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
- TAO_TRY
+ ACE_TRY
{
// get access to a Coffee Object
- this->cobj_ = objref->make_coffee (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->cobj_ = objref->make_coffee (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCH (CORBA::SystemException, sysex)
{
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("System Exception doing make_coffee");
+ //ACE_UNUSED_ARG (sysex);
+
+ ACE_PRINT_EXCEPTION (sysex, "System Exception doing make_coffee");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
this->reset_parameters ();
return 0;
@@ -163,20 +165,21 @@ Test_Any::reset_parameters (void)
int
Test_Any::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
+
CORBA::Any_out out (this->out_.out ());
this->ret_ = objref->test_any (this->in_,
this->inout_,
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Any::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (CORBA::_tc_any,
&this->in_,
@@ -194,23 +197,23 @@ Test_Any::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("o1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("o2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("o3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (CORBA::_tc_any,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (CORBA::_tc_any,
&this->ret_.inout (), // see above
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
diff --git a/TAO/tests/Param_Test/bd_long_seq.cpp b/TAO/tests/Param_Test/bd_long_seq.cpp
index fc43425187d..d48cbe24c4e 100644
--- a/TAO/tests/Param_Test/bd_long_seq.cpp
+++ b/TAO/tests/Param_Test/bd_long_seq.cpp
@@ -55,10 +55,10 @@ Test_Bounded_Long_Sequence::dii_req_invoke (CORBA::Request *req,
int
Test_Bounded_Long_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+ ACE_UNUSED_ARG (ACE_TRY_ENV);
// get some sequence length (32 in this case)
CORBA::ULong len = this->in_->maximum ();
@@ -85,20 +85,20 @@ Test_Bounded_Long_Sequence::reset_parameters (void)
int
Test_Bounded_Long_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Bounded_Long_Seq_out out (this->out_.out ());
this->ret_ = objref->test_bounded_long_sequence (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Bounded_Long_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Bounded_Long_Seq,
(void *) &this->in_.in (),
@@ -116,23 +116,23 @@ Test_Bounded_Long_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Bounded_Long_Seq,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Bounded_Long_Seq,
&this->ret_.inout (), // see above
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
diff --git a/TAO/tests/Param_Test/bd_short_seq.cpp b/TAO/tests/Param_Test/bd_short_seq.cpp
index c05160096f4..db5931cc9ae 100644
--- a/TAO/tests/Param_Test/bd_short_seq.cpp
+++ b/TAO/tests/Param_Test/bd_short_seq.cpp
@@ -54,11 +54,11 @@ Test_Bounded_Short_Sequence::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Bounded_Short_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Bounded_Short_Sequence::init_parameters (Param_Test_ptr /*objref*/,
+ CORBA::Environment & /*env*/)
{
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+ // ACE_UNUSED_ARG (objref);
+ // ACE_UNUSED_ARG (env);
// get some sequence length (32 in this case)
CORBA::ULong len = this->in_->maximum ();
@@ -87,20 +87,20 @@ Test_Bounded_Short_Sequence::reset_parameters (void)
int
Test_Bounded_Short_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Bounded_Short_Seq_out out (this->out_.out ());
this->ret_ = objref->test_bounded_short_sequence (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Bounded_Short_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Bounded_Short_Seq,
(void *) &this->in_.in (),
@@ -118,23 +118,23 @@ Test_Bounded_Short_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Bounded_Short_Seq,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Bounded_Short_Seq,
&this->ret_.inout (), // see above
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
diff --git a/TAO/tests/Param_Test/bd_str_seq.cpp b/TAO/tests/Param_Test/bd_str_seq.cpp
index 03feb93493b..c27afa3569f 100644
--- a/TAO/tests/Param_Test/bd_str_seq.cpp
+++ b/TAO/tests/Param_Test/bd_str_seq.cpp
@@ -92,20 +92,20 @@ Test_Bounded_String_Sequence::reset_parameters (void)
int
Test_Bounded_String_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Bounded_StrSeq_out out (this->out_.out ());
this->ret_ = objref->test_bounded_strseq (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Bounded_String_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Bounded_StrSeq,
(void *) &this->in_.in (),
@@ -123,23 +123,23 @@ Test_Bounded_String_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Bounded_StrSeq,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Bounded_StrSeq,
&this->ret_.inout (), // see above
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -166,9 +166,9 @@ Test_Bounded_String_Sequence::check_validity (void)
}
CORBA::Boolean
-Test_Bounded_String_Sequence::check_validity (CORBA::Request_ptr req)
+Test_Bounded_String_Sequence::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/bd_string.cpp b/TAO/tests/Param_Test/bd_string.cpp
index 5ee56325ae1..0dc6df8e141 100644
--- a/TAO/tests/Param_Test/bd_string.cpp
+++ b/TAO/tests/Param_Test/bd_string.cpp
@@ -62,12 +62,12 @@ Test_Bounded_String::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Bounded_String::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Bounded_String::init_parameters (Param_Test_ptr /*objref*/,
+ CORBA::Environment &/*env*/)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+ //ACE_UNUSED_ARG (objref);
+ //ACE_UNUSED_ARG (env);
// release any previously occupied values
CORBA::string_free (this->in_);
@@ -98,20 +98,20 @@ Test_Bounded_String::reset_parameters (void)
int
Test_Bounded_String::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::String_out str_out (this->out_);
this->ret_ = objref->test_unbounded_string (this->in_,
this->inout_,
str_out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Bounded_String::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
// create the parameters
CORBA::Any in_arg (CORBA::_tc_string,
@@ -130,23 +130,23 @@ Test_Bounded_String::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (CORBA::_tc_string,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (CORBA::_tc_string,
&this->ret_,
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -166,9 +166,9 @@ Test_Bounded_String::check_validity (void)
}
CORBA::Boolean
-Test_Bounded_String::check_validity (CORBA::Request_ptr req)
+Test_Bounded_String::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/bd_struct_seq.cpp b/TAO/tests/Param_Test/bd_struct_seq.cpp
index 7a9352a3d61..9a53167389e 100644
--- a/TAO/tests/Param_Test/bd_struct_seq.cpp
+++ b/TAO/tests/Param_Test/bd_struct_seq.cpp
@@ -57,13 +57,13 @@ Test_Bounded_Struct_Sequence::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Bounded_Struct_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Bounded_Struct_Sequence::init_parameters (Param_Test_ptr /*objref*/,
+ CORBA::Environment &/*env*/)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+ //ACE_UNUSED_ARG (objref);
+ //ACE_UNUSED_ARG (env);
// set the length of the sequence
this->in_.length (MAX_STRUCTSEQ_LEN);
@@ -88,20 +88,20 @@ Test_Bounded_Struct_Sequence::reset_parameters (void)
int
Test_Bounded_Struct_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Bounded_StructSeq_out out (this->out_.out ());
this->ret_ = objref->test_bounded_struct_sequence (this->in_,
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Bounded_Struct_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Bounded_StructSeq,
&this->in_,
@@ -119,23 +119,23 @@ Test_Bounded_Struct_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Bounded_StructSeq,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Bounded_StructSeq,
&this->ret_.inout (), // see above
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -151,9 +151,9 @@ Test_Bounded_Struct_Sequence::check_validity (void)
}
CORBA::Boolean
-Test_Bounded_Struct_Sequence::check_validity (CORBA::Request_ptr req)
+Test_Bounded_Struct_Sequence::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/big_union.cpp b/TAO/tests/Param_Test/big_union.cpp
index ed61ee7b545..e2dffe77bf5 100644
--- a/TAO/tests/Param_Test/big_union.cpp
+++ b/TAO/tests/Param_Test/big_union.cpp
@@ -53,21 +53,27 @@ Test_Big_Union::dii_req_invoke (CORBA::Request *req,
int
Test_Big_Union::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
- TAO_TRY
+ ACE_TRY
{
// get access to a Coffee Object
- this->cobj_ = objref->make_coffee (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->cobj_ = objref->make_coffee (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCH (CORBA::SystemException, sysex)
{
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("System Exception doing make_coffee");
+ //ACE_UNUSED_ARG (sysex);
+ ACE_PRINT_EXCEPTION (sysex,"System Exception doing make_coffee");
return -1;
}
- TAO_ENDTRY;
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "An exception caught in make_coffee");
+ return -1;
+ }
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
this->reset_parameters ();
return 0;
@@ -197,19 +203,19 @@ Test_Big_Union::reset_parameters (void)
int
Test_Big_Union::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
this->ret_ = objref->test_big_union (this->in_,
this->inout_,
this->out_,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Big_Union::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Big_Union,
&this->in_,
@@ -227,23 +233,23 @@ Test_Big_Union::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("u1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("u2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("u3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Big_Union,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Big_Union,
&this->ret_,
0,
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -278,7 +284,8 @@ Test_Big_Union::check_validity (void)
break;
case 1:
{
- ACE_TRY_NEW_ENV
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
{
Coffee_ptr in = this->in_.the_interface ();
Coffee_ptr inout = this->inout_.the_interface ();
@@ -530,9 +537,9 @@ Test_Big_Union::check_validity (void)
}
CORBA::Boolean
-Test_Big_Union::check_validity (CORBA::Request_ptr req)
+Test_Big_Union::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/client.cpp b/TAO/tests/Param_Test/client.cpp
index 15f28fdf5a2..1557f9ec3c2 100644
--- a/TAO/tests/Param_Test/client.cpp
+++ b/TAO/tests/Param_Test/client.cpp
@@ -49,7 +49,6 @@ template <class T> int
Param_Test_Client<T>::run_sii_test (void)
{
CORBA::ULong i; // loop index
- CORBA::Environment env; // to track errors
Options *opt = OPTIONS::instance (); // get the options
const char *opname = this->test_object_->opname (); // operation
@@ -62,43 +61,55 @@ Param_Test_Client<T>::run_sii_test (void)
this->results_.error_count (0);
this->results_.iterations (opt->loop_count ());
+ // Declare the Env
+ ACE_DECLARE_NEW_CORBA_ENV;
// Initialize parameters for the test.
- if (this->test_object_->init_parameters (this->param_test_, env) == -1)
+ if (this->test_object_->init_parameters (this->param_test_, ACE_TRY_ENV) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) client.cpp - run_sii_test:"
"init_parameters failed for opname - %s",
opname), -1);
+
// Make the calls in a loop.
for (i = 0; i < opt->loop_count (); i++)
{
- this->results_.call_count (this->results_.call_count () + 1);
- if (opt->debug ())
- ACE_DEBUG ((LM_DEBUG, "\n****** Before call values *****\n"));
+ ACE_TRY
+ {
+ this->results_.call_count (this->results_.call_count () + 1);
+ if (opt->debug ())
+ ACE_DEBUG ((LM_DEBUG, "\n****** Before call values *****\n"));
- // start the timing
- this->results_.start_timer ();
+ // start the timing
+ this->results_.start_timer ();
- // make the call
- if (this->test_object_->run_sii_test (this->param_test_, env) == -1)
+ // make the call
+ this->test_object_->run_sii_test (this->param_test_, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // stop the timer.
+ this->results_.stop_timer ();
+
+ // now check if the values returned are as expected
+ if (opt->debug ())
+ {
+ ACE_DEBUG ((LM_DEBUG, "\n****** After call values *****\n"));
+ this->test_object_->print_values ();
+ }
+ }
+ ACE_CATCHANY
{
+
this->results_.error_count (this->results_.error_count () + 1);
- env.print_exception (opname);
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, opname);
ACE_ERROR ((LM_ERROR,
"(%N:%l) client.cpp - run_sii_test:"
"run_sii_test exception in iteration %d",
i));
- continue;
- }
- // stop the timer.
- this->results_.stop_timer ();
-
- // now check if the values returned are as expected
- if (opt->debug ())
- {
- ACE_DEBUG ((LM_DEBUG, "\n****** After call values *****\n"));
- this->test_object_->print_values ();
+ goto loop_around;
+
}
+ ACE_ENDTRY;
if (!this->test_object_->check_validity ())
{
@@ -115,6 +126,7 @@ Param_Test_Client<T>::run_sii_test (void)
"(%N:%l) client.cpp - run_sii_test:"
"init_parameters failed for opname - %s",
opname), -1);
+ loop_around: continue;
}
// print statistics
@@ -140,8 +152,6 @@ Param_Test_Client<T>::run_dii_test (void)
{
const char *opname = this->test_object_->opname ();
Options *opt = OPTIONS::instance ();
- CORBA::Environment env; // environment
-
ACE_DEBUG ((LM_DEBUG,
"********** %s DII *********\n",
opname));
@@ -151,14 +161,16 @@ Param_Test_Client<T>::run_dii_test (void)
this->results_.error_count (0);
this->results_.iterations (opt->loop_count ());
+ // Environment variable
+ ACE_DECLARE_NEW_CORBA_ENV;
// initialize parameters for the test
- if (this->test_object_->init_parameters (this->param_test_, env) == -1)
+ if (this->test_object_->init_parameters (this->param_test_, ACE_TRY_ENV) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) client.cpp - run_dii_test:"
"init_parameters failed for opname - %s",
opname), -1);
- // Make the calls in a loop.
+ // Make the calls in a loop.
for (CORBA::ULong i = 0; i < opt->loop_count (); i++)
{
this->results_.call_count (this->results_.call_count () + 1);
@@ -175,43 +187,38 @@ Param_Test_Client<T>::run_dii_test (void)
// then the result holder (length 1 because value is *replaced*)
CORBA::NVList_var retval;
this->orb_->create_list (1, retval.out ());
-
- // add arguments and typecode for return valueto the NVList
- if (this->test_object_->add_args (nvlist,
- retval.in (),
- env) == -1)
- {
- this->results_.error_count (this->results_.error_count () + 1);
- env.print_exception (opname);
- ACE_ERROR ((LM_ERROR,
- "(%N:%l) client.cpp - "
- "Failed to add args in iteration %d",
- i));
- continue;
- }
-
+
// create the request
CORBA::Request_var req;
- CORBA::NamedValue_ptr result =
- CORBA::NamedValue::_duplicate (retval->item (0, env));
- this->param_test_->_create_request (opname,
- nvlist,
- result,
- req.out (),
- 0, //CORBA::OUT_LIST_MEMORY,
- env);
- // The OUT_LIST_MEMORY is to be used when the ORB assumes that
- // we will provide the top-level storage. With 0, the returned
- // values for ret, inout, and out parameters are all owned by
- // the ORB and hence we must not free them explicitly.
-
- if (opt->debug ())
- ACE_DEBUG ((LM_DEBUG, "\n****** Before call values *****\n"));
-
- // Make the invocation, verify the result.
- ACE_DECLARE_NEW_CORBA_ENV;
+
ACE_TRY
{
+ // add arguments and typecode for return valueto the NVList
+ this->test_object_->add_args (nvlist,
+ retval.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ CORBA::NamedValue_ptr result =
+ CORBA::NamedValue::_duplicate (retval->item (0, ACE_TRY_ENV));
+ ACE_TRY_CHECK;
+
+ this->param_test_->_create_request (opname,
+ nvlist,
+ result,
+ req.out (),
+ 0, //CORBA::OUT_LIST_MEMORY,
+ ACE_TRY_ENV);
+ // The OUT_LIST_MEMORY is to be used when the ORB assumes that
+ // we will provide the top-level storage. With 0, the returned
+ // values for ret, inout, and out parameters are all owned by
+ // the ORB and hence we must not free them explicitly.
+ ACE_TRY_CHECK;
+
+ if (opt->debug ())
+ ACE_DEBUG ((LM_DEBUG, "\n****** Before call values *****\n"));
+
+ // Make the invocation, verify the result.
this->test_object_->dii_req_invoke (req, ACE_TRY_ENV);
ACE_TRY_CHECK;
}
@@ -245,7 +252,7 @@ Param_Test_Client<T>::run_dii_test (void)
// reset parameters for the test
this->test_object_->reset_parameters ();
- loop_around:;
+ loop_around:continue;
} // for loop
// print statistics
diff --git a/TAO/tests/Param_Test/driver.cpp b/TAO/tests/Param_Test/driver.cpp
index ba33b194b12..32de5be432e 100644
--- a/TAO/tests/Param_Test/driver.cpp
+++ b/TAO/tests/Param_Test/driver.cpp
@@ -61,52 +61,60 @@ int
Driver::init (int argc, char **argv)
{
// environment to track exceptions
- CORBA::Environment env;
+ ACE_DECLARE_NEW_CORBA_ENV;
+ //CORBA::Environment env;
// retrieve the instance of Options
Options *opt = OPTIONS::instance ();
- // Retrieve the underlying ORB
- this->orb_ = CORBA::ORB_init (argc,
- argv,
- "internet",
- env);
+ char exception_string[256];
- if (env.exception () != 0)
+ ACE_TRY
{
- env.print_exception ("ORB initialization");
- return -1;
- }
-
- // Parse command line and verify parameters.
- if (opt->parse_args (argc, argv) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) driver.cpp - "
- "parse_args failed\n"),
- -1);
-
- // Retrieve a Param_Test object reference
- CORBA::Object_var temp =
- this->orb_->string_to_object (opt->param_test_ior (), env);
- if (env.exception () != 0)
- {
- env.print_exception ("ORB::string_to_object() failed.");
- return -1;
+ ACE_OS::strcpy (exception_string, "ORB Initialization");
+
+ // Retrieve the underlying ORB
+ this->orb_ = CORBA::ORB_init (argc,
+ argv,
+ "internet",
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Parse command line and verify parameters.
+ if (opt->parse_args (argc, argv) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) driver.cpp - "
+ "parse_args failed\n"),
+ -1);
+ // Retrieve a Param_Test object reference
+ ACE_OS::strcpy (exception_string,"ORB::string_to_object() failed.");
+
+ CORBA::Object_var temp =
+ this->orb_->string_to_object (opt->param_test_ior (), ACE_TRY_ENV);
+
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (temp.in()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ORB::string_to_object() returned null object for IOR <%s>\n",
+ opt->param_test_ior ()),
+ -1);
+
+ // Get the object reference
+ ACE_OS::strcpy (exception_string,"Param_Test::_narrow () failed.");
+
+ this->objref_ = Param_Test::_narrow (temp.in(), ACE_TRY_ENV);
+
+ ACE_TRY_CHECK;
}
-
- if (CORBA::is_nil (temp.in()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "ORB::string_to_object() returned null object for IOR <%s>\n",
- opt->param_test_ior ()),
- -1);
-
- this->objref_ = Param_Test::_narrow (temp.in(), env);
- if (env.exception () != 0)
+ ACE_CATCHANY
{
- env.print_exception ("Param_Test::_narrow failed");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, exception_string);
return -1;
}
-
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
+
return 0;
}
@@ -467,19 +475,21 @@ Driver::run (void)
break;
}
- TAO_TRY
+ // Get in a new environment variable
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
{
if (opt->shutdown ())
{
- this->objref_->shutdown (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->objref_->shutdown (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("during shutdown");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "during shutdown");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return retstatus;
}
diff --git a/TAO/tests/Param_Test/except.cpp b/TAO/tests/Param_Test/except.cpp
index efe8f291ff8..2b863c585ee 100644
--- a/TAO/tests/Param_Test/except.cpp
+++ b/TAO/tests/Param_Test/except.cpp
@@ -119,19 +119,17 @@ Test_Exception::reset_parameters (void)
int
Test_Exception::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &TAO_IN_ENV)
+ CORBA::Environment &ACE_TRY_ENV)
{
- TAO_TRY
+ ACE_TRY
{
this->ret_ = objref->test_exception (this->in_,
this->inout_,
this->out_,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- return 0;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (Param_Test::Ooops, ex)
+ ACE_CATCH (Param_Test::Ooops, ex)
{
if (TAO_debug_level > 0)
{
@@ -146,37 +144,31 @@ Test_Exception::run_sii_test (Param_Test_ptr objref,
this->inout_ = this->in_ * 2;
this->out_ = this->in_ * 3;
this->ret_ = this->in_ * 4;
- TAO_TRY_ENV.clear ();
-
- return 0;
}
- TAO_CATCH (CORBA::UNKNOWN, ex)
+ ACE_CATCH (CORBA::UNKNOWN, ex)
{
if (TAO_debug_level > 0)
{
- TAO_TRY_ENV.print_exception ("Test_Exception::run_sii_test - "
- "expected system exception\n");
+ ACE_PRINT_EXCEPTION (ex,"Test_Exception::run_sii_test - expected system exception\n");
}
this->inout_ = this->in_ * 2;
this->out_ = this->in_ * 3;
this->ret_ = this->in_ * 4;
- TAO_TRY_ENV.clear ();
-
- return 0;
}
- TAO_CATCH (Param_Test::BadBoy, ex)
+ ACE_CATCH (Param_Test::BadBoy, ex)
{
- TAO_TRY_ENV.print_exception ("Test_Exception::run_sii_test - "
- " unexpected exception\n");
- TAO_RETHROW_RETURN (-1);
+ ACE_PRINT_EXCEPTION (ex,"Test_Exception::run_sii_test - unexpected system exception\n");
}
- TAO_ENDTRY_RETURN (-1);
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
+
+ return 0;
}
int
Test_Exception::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
// we provide top level memory to the ORB to retrieve the data
CORBA::Any in_arg (CORBA::_tc_ulong,
@@ -195,24 +187,24 @@ Test_Exception::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value. Let the ORB allocate storage. We simply tell the ORB
// what type we are expecting.
- retval->item (0, env)->value ()->replace (CORBA::_tc_ulong,
- &this->ret_,
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (CORBA::_tc_ulong,
+ &this->ret_,
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
diff --git a/TAO/tests/Param_Test/fixed_array.cpp b/TAO/tests/Param_Test/fixed_array.cpp
index 0619ba97d8d..9027af625e1 100644
--- a/TAO/tests/Param_Test/fixed_array.cpp
+++ b/TAO/tests/Param_Test/fixed_array.cpp
@@ -51,13 +51,13 @@ Test_Fixed_Array::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Fixed_Array::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Fixed_Array::init_parameters (Param_Test_ptr /*objref*/,
+ CORBA::Environment &/*env*/)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+ //ACE_UNUSED_ARG (objref);
+ //ACE_UNUSED_ARG (env);
for (CORBA::ULong i=0; i < Param_Test::DIM1; i++)
{
@@ -85,19 +85,19 @@ Test_Fixed_Array::reset_parameters (void)
int
Test_Fixed_Array::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
this->ret_ = objref->test_fixed_array (this->in_,
this->inout_,
this->out_,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Fixed_Array::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
// We provide the top level memory
// the Any does not own any of these
@@ -117,23 +117,23 @@ Test_Fixed_Array::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("l1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("l2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("l3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Fixed_Array,
- this->ret_.inout (),
- 0, // does not own
- env);
+ 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;
}
@@ -149,9 +149,9 @@ Test_Fixed_Array::check_validity (void)
}
CORBA::Boolean
-Test_Fixed_Array::check_validity (CORBA::Request_ptr req)
+Test_Fixed_Array::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/fixed_struct.cpp b/TAO/tests/Param_Test/fixed_struct.cpp
index cfd7d125085..281ab6c72c1 100644
--- a/TAO/tests/Param_Test/fixed_struct.cpp
+++ b/TAO/tests/Param_Test/fixed_struct.cpp
@@ -50,13 +50,13 @@ Test_Fixed_Struct::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Fixed_Struct::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Fixed_Struct::init_parameters (Param_Test_ptr /*objref*/,
+ CORBA::Environment &/*env*/)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+ //ACE_UNUSED_ARG (objref);
+ //ACE_UNUSED_ARG (env);
this->in_ = gen->gen_fixed_struct ();
ACE_OS::memset (&this->inout_,
@@ -85,19 +85,19 @@ Test_Fixed_Struct::reset_parameters (void)
int
Test_Fixed_Struct::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
this->ret_ = objref->test_fixed_struct (this->in_,
this->inout_,
this->out_,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Fixed_Struct::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
// We provide the top level memory
// the Any does not own any of these
@@ -117,23 +117,23 @@ Test_Fixed_Struct::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Fixed_Struct,
- &this->ret_,
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Fixed_Struct,
+ &this->ret_,
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -167,9 +167,9 @@ Test_Fixed_Struct::check_validity (void)
}
CORBA::Boolean
-Test_Fixed_Struct::check_validity (CORBA::Request_ptr req)
+Test_Fixed_Struct::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/nested_struct.cpp b/TAO/tests/Param_Test/nested_struct.cpp
index b1aca1d24e2..64a99a82741 100644
--- a/TAO/tests/Param_Test/nested_struct.cpp
+++ b/TAO/tests/Param_Test/nested_struct.cpp
@@ -54,13 +54,13 @@ Test_Nested_Struct::dii_req_invoke (CORBA::Request *req, CORBA::Environment &ACE
}
int
-Test_Nested_Struct::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Nested_Struct::init_parameters (Param_Test_ptr /*objref*/,
+ CORBA::Environment &/*env*/)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+ //ACE_UNUSED_ARG (objref);
+ //ACE_UNUSED_ARG (env);
// get some sequence length (not more than 10)
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
@@ -89,20 +89,20 @@ Test_Nested_Struct::reset_parameters (void)
int
Test_Nested_Struct::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Nested_Struct_out out (this->out_.out ());
this->ret_ = objref->test_nested_struct (this->in_,
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Nested_Struct::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Nested_Struct,
(void *) &this->in_,
@@ -120,23 +120,23 @@ Test_Nested_Struct::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Nested_Struct,
- &this->ret_.inout (), // see above
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Nested_Struct,
+ &this->ret_.inout (), // see above
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -163,9 +163,9 @@ Test_Nested_Struct::check_validity (void)
}
CORBA::Boolean
-Test_Nested_Struct::check_validity (CORBA::Request_ptr req)
+Test_Nested_Struct::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/objref.cpp b/TAO/tests/Param_Test/objref.cpp
index 47dc6bb2482..99fd11c90fe 100644
--- a/TAO/tests/Param_Test/objref.cpp
+++ b/TAO/tests/Param_Test/objref.cpp
@@ -69,35 +69,43 @@ static const char *Coffee_Flavor [] = {
int
Test_ObjRef::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Coffee::Desc desc;
Generator *gen = GENERATOR::instance (); // value generator
- // first get a Coffee object
- this->in_ = objref->make_coffee (env);
- if (env.exception ())
+ // New environment variable
+ char msg_str[256] = "";
+
+ ACE_TRY
{
- env.print_exception ("make_coffee");
- return -1;
- }
+ ACE_OS::strcpy (msg_str, "make_cofee");
- // Get some index into Coffee_Flavor [].
- CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
- desc.name = Coffee_Flavor [index];
- // set the attribute of the object
- this->in_->description (desc, env); // set the attribute for the in object
+ // first get a Coffee object
+ this->in_ = objref->make_coffee (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- if (env.exception ())
+ // Get some index into Coffee_Flavor [].
+ CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
+ desc.name = Coffee_Flavor [index];
+
+ // set the attribute of the object
+ ACE_OS::strcpy (msg_str, "set coffee attribute");
+ this->in_->description (desc, ACE_TRY_ENV); // set the attribute for the in object
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
{
- env.print_exception ("set coffee attribute");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, msg_str);
return -1;
}
-
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
+
this->inout_ = Coffee::_nil ();
this->out_ = Coffee::_nil ();
this->ret_ = Coffee::_nil ();
-
+
// DII
*this->in_courier = ACE_dynamic_cast (CORBA::Object_ptr,
this->in_.in ());
@@ -107,29 +115,36 @@ Test_ObjRef::init_parameters (Param_Test_ptr objref,
this->out_.in ());
*this->ret_courier = ACE_dynamic_cast (CORBA::Object_ptr,
this->ret_.in ());
-
return 0;
}
int
Test_ObjRef::reset_parameters (void)
{
- CORBA::Environment env;
+ // Environemnt variable
+ ACE_DECLARE_NEW_CORBA_ENV;
+ //CORBA::Environment env;
Coffee::Desc desc;
Generator *gen = GENERATOR::instance (); // value generator
// Get some index into Coffee_Flavor [].
CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
desc.name = Coffee_Flavor [index];
- // set the attribute of the object
- this->in_->description (desc, env); // set the attribute for the in object
- if (env.exception ())
+ ACE_TRY
+ {
+ // set the attribute of the object
+ this->in_->description (desc, ACE_TRY_ENV); // set the attribute for the in object
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
{
- env.print_exception ("set coffee attribute");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "set coffee attribute");
return -1;
}
-
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
+
this->inout_ = Coffee::_nil ();
this->out_ = Coffee::_nil ();
this->ret_ = Coffee::_nil ();
@@ -145,20 +160,20 @@ Test_ObjRef::reset_parameters (void)
int
Test_ObjRef::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Coffee_out out (this->out_.out ());
this->ret_ = objref->test_objref (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_ObjRef::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (_tc_Coffee,
this->in_courier,
@@ -176,23 +191,23 @@ Test_ObjRef::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("o1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("o2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("o3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// Add return value.
- retval->item (0, env)->value ()->replace (_tc_Coffee,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (_tc_Coffee,
this->ret_courier,
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -200,42 +215,47 @@ Test_ObjRef::add_args (CORBA::NVList_ptr param_list,
CORBA::Boolean
Test_ObjRef::check_validity (void)
{
- CORBA::Environment env;
+ // Environemnt variable
+ ACE_DECLARE_NEW_CORBA_ENV;
- Coffee::Desc_var in_desc =
- this->in_->description (env);
- if (env.exception ())
- {
- env.print_exception ("retrieving description");
- return 0;
- }
- const char* in = in_desc->name.in ();
+ //CORBA::Environment env;
- Coffee::Desc_var inout_desc =
- this->inout_->description (env);
- if (env.exception ())
- {
- env.print_exception ("retrieving description");
- return 0;
- }
- const char* inout = inout_desc->name.in ();
+ Coffee::Desc_var ret_desc;
+ const char *in = 0;
+ const char *out = 0;
+ const char *inout = 0;
- Coffee::Desc_var out_desc =
- this->out_->description (env);
- if (env.exception ())
+ ACE_TRY
{
- env.print_exception ("retrieving description");
- return 0;
+ Coffee::Desc_var in_desc =
+ this->in_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ in = in_desc->name.in ();
+
+ Coffee::Desc_var inout_desc =
+ this->inout_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ inout = inout_desc->name.in ();
+
+ Coffee::Desc_var out_desc =
+ this->out_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ out = out_desc->name.in ();
+
+ ret_desc = this->out_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- const char* out = out_desc->name.in ();
-
- Coffee::Desc_var ret_desc =
- this->out_->description (env);
- if (env.exception ())
+ ACE_CATCHANY
{
- env.print_exception ("retrieving description");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Retriving description");
return 0;
}
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (0);
+
const char* ret = ret_desc->name.in ();
// now compare them
@@ -248,77 +268,79 @@ Test_ObjRef::check_validity (void)
}
CORBA::Boolean
-Test_ObjRef::check_validity (CORBA::Request_ptr req)
+Test_ObjRef::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
- CORBA::Environment env;
+ //ACE_UNUSED_ARG (req);
+ //CORBA::Environment env;
+ ACE_DECLARE_NEW_CORBA_ENV;
// Narrow each checked variable into its _var before
// calling check_validity().
- this->inout_ = Coffee::_narrow (*this->inout_courier, env);
- if (env.exception ())
+ ACE_TRY
{
- env.print_exception ("_narrow from DII result");
- return 0;
+ this->inout_ = Coffee::_narrow (*this->inout_courier, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ this->out_ = Coffee::_narrow (*this->out_courier, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ this->ret_ = Coffee::_narrow (*this->ret_courier, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
-
- this->out_ = Coffee::_narrow (*this->out_courier, env);
- if (env.exception ())
- {
- env.print_exception ("_narrow from DII result");
- return 0;
- }
-
- this->ret_ = Coffee::_narrow (*this->ret_courier, env);
- if (env.exception ())
+ ACE_CATCHANY
{
- env.print_exception ("_narrow from DII result");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "_narrow from DII result");
return 0;
}
-
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
+
return this->check_validity ();
}
void
Test_ObjRef::print_values (void)
{
- CORBA::Environment env;
+ // CORBA::Environment env;
- Coffee::Desc_var in_desc =
- this->in_->description (env);
- if (env.exception ())
- {
- env.print_exception ("retrieving description");
- return;
- }
- const char* in = in_desc->name.in ();
+ // Env. variable
+ ACE_DECLARE_NEW_CORBA_ENV;
- Coffee::Desc_var inout_desc =
- this->inout_->description (env);
- if (env.exception ())
+ Coffee::Desc_var ret_desc;
+ const char *in = 0;
+ const char *out = 0;
+ const char *inout = 0;
+ ACE_TRY
{
- env.print_exception ("retrieving description");
- return;
+ Coffee::Desc_var in_desc =
+ this->in_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ in = in_desc->name.in ();
+
+ Coffee::Desc_var inout_desc =
+ this->inout_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ inout = inout_desc->name.in ();
+
+ Coffee::Desc_var out_desc =
+ this->out_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ out = out_desc->name.in ();
+
+ ret_desc = this->out_->description (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- const char* inout = inout_desc->name.in ();
-
- Coffee::Desc_var out_desc =
- this->out_->description (env);
- if (env.exception ())
+ ACE_CATCHANY
{
- env.print_exception ("retrieving description");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Retrieving Description");
return;
}
- const char* out = out_desc->name.in ();
+ ACE_ENDTRY;
+ ACE_CHECK;
- Coffee::Desc_var ret_desc =
- this->out_->description (env);
- if (env.exception ())
- {
- env.print_exception ("retrieving description");
- return;
- }
const char* ret = ret_desc->name.in ();
diff --git a/TAO/tests/Param_Test/objref_struct.cpp b/TAO/tests/Param_Test/objref_struct.cpp
index 8edbbbf94e9..03d1b6e0c05 100644
--- a/TAO/tests/Param_Test/objref_struct.cpp
+++ b/TAO/tests/Param_Test/objref_struct.cpp
@@ -56,18 +56,18 @@ Test_Objref_Struct::dii_req_invoke (CORBA::Request *req,
int
Test_Objref_Struct::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Generator *gen = GENERATOR::instance (); // value generator
// set the length of the sequence
this->in_.x = gen->gen_long ();
- this->in_.y = objref->make_coffee (env);
- if (env.exception () != 0) return -1;
+ this->in_.y = objref->make_coffee (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return -1;
Coffee::Desc d;
d.name = gen->gen_string ();
- this->in_.y->description (d, env);
- if (env.exception () != 0) return -1;
+ this->in_.y->description (d, ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return -1;
return 0;
}
@@ -83,20 +83,20 @@ Test_Objref_Struct::reset_parameters (void)
int
Test_Objref_Struct::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Objref_Struct_out out (this->out_.out ());
this->ret_ = objref->test_objref_struct (this->in_,
- this->inout_.inout (),
- out,
- env);
- return (env.exception () ? -1:0);
+ this->inout_.inout (),
+ out,
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Objref_Struct::add_args (CORBA::NVList_ptr param_list,
- CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::NVList_ptr retval,
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Objref_Struct,
&this->in_,
@@ -114,23 +114,23 @@ Test_Objref_Struct::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Objref_Struct,
- &this->ret_.inout (), // see above
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Objref_Struct,
+ &this->ret_.inout (), // see above
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -143,21 +143,22 @@ Test_Objref_Struct::check_validity (void)
|| this->in_.x != this->ret_->x)
return 0;
- CORBA::Environment env;
- if (CORBA::is_nil (this->in_.y.in ())
- || CORBA::is_nil (this->out_->y.in ())
- || CORBA::is_nil (this->ret_->y.in ())
- || CORBA::is_nil (this->inout_->y.in ()) )
- return 0;
-
- Coffee::Desc_var s_in = this->in_.y->description (env);
- if (env.exception () != 0) return 0;
- Coffee::Desc_var s_out = this->out_->y->description (env);
- if (env.exception () != 0) return 0;
- Coffee::Desc_var s_inout = this->inout_->y->description (env);
- if (env.exception () != 0) return 0;
- Coffee::Desc_var s_ret = this->ret_->y->description (env);
- if (env.exception () != 0) return 0;
+ // CORBA::Environment env;
+ ACE_DECLARE_NEW_CORBA_ENV;
+ if (CORBA::is_nil (this->in_.y.in ())
+ || CORBA::is_nil (this->out_->y.in ())
+ || CORBA::is_nil (this->ret_->y.in ())
+ || CORBA::is_nil (this->inout_->y.in ()) )
+ return 0;
+
+ Coffee::Desc_var s_in = this->in_.y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return 0;
+ Coffee::Desc_var s_out = this->out_->y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return 0;
+ Coffee::Desc_var s_inout = this->inout_->y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return 0;
+ Coffee::Desc_var s_ret = this->ret_->y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return 0;
if (ACE_OS::strcmp (s_in->name, s_out->name) != 0
|| ACE_OS::strcmp (s_in->name, s_inout->name) != 0
@@ -168,9 +169,8 @@ Test_Objref_Struct::check_validity (void)
}
CORBA::Boolean
-Test_Objref_Struct::check_validity (CORBA::Request_ptr req)
+Test_Objref_Struct::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
@@ -188,16 +188,18 @@ Test_Objref_Struct::print_values (void)
this->out_->x,
this->ret_->x ));
- CORBA::Environment env;
+ //CORBA::Environment env;
+
+ ACE_DECLARE_NEW_CORBA_ENV;
- Coffee::Desc_var s_in = this->in_.y->description (env);
- if (env.exception () != 0) return;
- Coffee::Desc_var s_out = this->out_->y->description (env);
- if (env.exception () != 0) return;
- Coffee::Desc_var s_inout = this->inout_->y->description (env);
- if (env.exception () != 0) return;
- Coffee::Desc_var s_ret = this->ret_->y->description (env);
- if (env.exception () != 0) return;
+ Coffee::Desc_var s_in = this->in_.y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return;
+ Coffee::Desc_var s_out = this->out_->y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return;
+ Coffee::Desc_var s_inout = this->inout_->y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return;
+ Coffee::Desc_var s_ret = this->ret_->y->description (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception () != 0) return;
ACE_DEBUG ((LM_DEBUG,
"\n*=*=*=*=*=*=*=*=*=*=\n"
diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp
index 1817b8b6cd8..f00d9d58a7b 100644
--- a/TAO/tests/Param_Test/param_test_i.cpp
+++ b/TAO/tests/Param_Test/param_test_i.cpp
@@ -98,9 +98,8 @@ char *
Param_Test_i::test_unbounded_string (const char *s1,
char *&s2,
CORBA::String_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (env);
char *retstr = CORBA::string_dup (s1);
s3 = CORBA::string_dup (s1);
char *tmp = CORBA::string_alloc (2*ACE_OS::strlen (s2));
@@ -133,9 +132,8 @@ Param_Test::Fixed_Struct
Param_Test_i::test_fixed_struct (const Param_Test::Fixed_Struct &s1,
Param_Test::Fixed_Struct &s2,
Param_Test::Fixed_Struct_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (env);
s2 = s1;
s3 = s1;
return s1;
@@ -153,7 +151,7 @@ Param_Test::Long_Seq * Param_Test_i::test_long_sequence (
Param_Test::Long_Seq
*ret = new Param_Test::Long_Seq,
*out = new Param_Test::Long_Seq;
-
+
s2 = s1;
*out = s1;
*ret = s1;
@@ -219,9 +217,8 @@ Param_Test::StrSeq *
Param_Test_i::test_strseq (const Param_Test::StrSeq &s1,
Param_Test::StrSeq &s2,
Param_Test::StrSeq_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (env);
// we copy the "in" sequences into all the inout, out and return sequences.
Param_Test::StrSeq
@@ -435,9 +432,8 @@ Param_Test::AnySeq *
Param_Test_i::test_anyseq (const Param_Test::AnySeq &s1,
Param_Test::AnySeq &s2,
Param_Test::AnySeq_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (env);
// we copy the "in" sequences into all the inout, out and return sequences.
Param_Test::AnySeq
@@ -459,9 +455,8 @@ Param_Test::Var_Struct *
Param_Test_i::test_var_struct (const Param_Test::Var_Struct &s1,
Param_Test::Var_Struct &s2,
Param_Test::Var_Struct_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (env);
// we copy the "in" sequences into all the inout, out and return sequences.
Param_Test::Var_Struct
@@ -481,9 +476,8 @@ Param_Test::Nested_Struct *
Param_Test_i::test_nested_struct (const Param_Test::Nested_Struct &s1,
Param_Test::Nested_Struct &s2,
Param_Test::Nested_Struct_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (env);
// we copy the "in" sequences into all the inout, out and return sequences.
Param_Test::Nested_Struct
@@ -502,9 +496,8 @@ Param_Test::Objref_Struct *
Param_Test_i::test_objref_struct (const Param_Test::Objref_Struct &s1,
Param_Test::Objref_Struct &s2,
Param_Test::Objref_Struct_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (env);
// we copy the "in" sequences into all the inout, out and return sequences.
Param_Test::Objref_Struct
@@ -521,9 +514,9 @@ Param_Test_i::test_objref_struct (const Param_Test::Objref_Struct &s1,
// make a Coffee object
Coffee_ptr
-Param_Test_i::make_coffee (CORBA::Environment &env)
+Param_Test_i::make_coffee (CORBA::Environment &ACE_TRY_ENV)
{
- return this->obj_._this (env);
+ return this->obj_._this (ACE_TRY_ENV);
}
// test for object references
@@ -531,19 +524,19 @@ Coffee_ptr
Param_Test_i::test_objref (Coffee_ptr o1,
Coffee_ptr &o2,
Coffee_out o3,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Coffee_ptr ret = Coffee::_nil ();
- TAO_TRY
+ ACE_TRY
{
- Coffee_var myobj = obj_._this (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ Coffee_var myobj = obj_._this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (!CORBA::is_nil (o2))
CORBA::release (o2);
- if (myobj->_is_equivalent (o1, env))
+ if (myobj->_is_equivalent (o1, ACE_TRY_ENV))
{
o2 = Coffee::_duplicate (myobj.in ());
o3 = Coffee::_duplicate (myobj.in ());
@@ -555,17 +548,17 @@ Param_Test_i::test_objref (Coffee_ptr o1,
o3 = Coffee::_nil ();
}
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCH (CORBA::SystemException, sysex)
{
- TAO_TRY_ENV.print_exception ("System Exception");
- env.exception (TAO_TRY_ENV.exception ());
+ ACE_PRINT_EXCEPTION (sysex, "System Exception");
+ // env.exception (TAO_TRY_ENV.exception ());
}
- TAO_CATCH (CORBA::UserException, userex)
+ ACE_CATCH (CORBA::UserException, userex)
{
- TAO_TRY_ENV.print_exception ("User Exception");
- env.exception (TAO_TRY_ENV.exception ());
+ ACE_PRINT_EXCEPTION (userex, "User Exception");
+ // env.exception (TAO_TRY_ENV.exception ());
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return ret;
}
@@ -575,7 +568,7 @@ CORBA::TypeCode_ptr
Param_Test_i::test_typecode (CORBA::TypeCode_ptr t1,
CORBA::TypeCode_ptr &t2,
CORBA::TypeCode_out t3,
- CORBA::Environment &env)
+ CORBA::Environment &/*env*/)
{
// we simply assign t1 to the others
CORBA::TypeCode_ptr retval = CORBA::TypeCode::_duplicate (t1);
@@ -589,7 +582,7 @@ CORBA::Any *
Param_Test_i::test_any (const CORBA::Any &a1,
CORBA::Any &a2,
CORBA::Any_out a3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
CORBA::Any *ret;
CORBA::Short short_in;
@@ -674,11 +667,10 @@ Param_Test::Fixed_Array_slice *
Param_Test_i::test_fixed_array (const Param_Test::Fixed_Array a1,
Param_Test::Fixed_Array a2,
Param_Test::Fixed_Array_out a3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
Param_Test::Fixed_Array_slice *ret;
- ACE_UNUSED_ARG (env);
-
+
Param_Test::Fixed_Array_copy (a2, a1);
Param_Test::Fixed_Array_copy (a3, a1);
ret = Param_Test::Fixed_Array_dup (a1);
@@ -690,11 +682,10 @@ Param_Test::Var_Array_slice *
Param_Test_i::test_var_array (const Param_Test::Var_Array a1,
Param_Test::Var_Array a2,
Param_Test::Var_Array_out a3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
Param_Test::Var_Array_slice *ret;
- ACE_UNUSED_ARG (env);
-
+
Param_Test::Var_Array_copy (a2, a1);
a3 = Param_Test::Var_Array_dup (a1);
ret = Param_Test::Var_Array_dup (a1);
@@ -705,7 +696,7 @@ CORBA::ULong
Param_Test_i::test_exception (CORBA::ULong s1,
CORBA::ULong& s2,
CORBA::ULong_out s3,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
int d = this->test_exception_count_ % 3;
this->test_exception_count_++;
@@ -717,11 +708,11 @@ Param_Test_i::test_exception (CORBA::ULong s1,
}
else if (d == 1)
{
- env.exception (new Param_Test::Ooops (CORBA::string_dup (" % 3 == 1"),
+ ACE_TRY_ENV.exception (new Param_Test::Ooops (CORBA::string_dup (" % 3 == 1"),
s1));
return 0;
}
- env.exception (new Param_Test::BadBoy);
+ ACE_TRY_ENV.exception (new Param_Test::BadBoy);
return 0;
}
@@ -729,7 +720,7 @@ Param_Test::Big_Union*
Param_Test_i::test_big_union (const Param_Test::Big_Union& u1,
Param_Test::Big_Union& u2,
Param_Test::Big_Union_out u3,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
Param_Test::Big_Union_var ret (new Param_Test::Big_Union (u1));
u2 = u1;
diff --git a/TAO/tests/Param_Test/results.cpp b/TAO/tests/Param_Test/results.cpp
index 405441edf59..c5055e1c5fb 100644
--- a/TAO/tests/Param_Test/results.cpp
+++ b/TAO/tests/Param_Test/results.cpp
@@ -101,9 +101,9 @@ Results::print_stats (void)
void
Results::print_exception (const char *call_name,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
- env.print_exception (call_name);
+ //ACE_PRINT_EXCEPTION (call_name);
}
void
diff --git a/TAO/tests/Param_Test/run_test.pl b/TAO/tests/Param_Test/run_test.pl
index 3ff2eefa64c..4aaf42d658e 100755
--- a/TAO/tests/Param_Test/run_test.pl
+++ b/TAO/tests/Param_Test/run_test.pl
@@ -6,6 +6,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "../../../bin";
require ACEutils;
+require Process;
$port = 0;
$iorfile = "server.ior";
diff --git a/TAO/tests/Param_Test/server.cpp b/TAO/tests/Param_Test/server.cpp
index e5d97ab8cd7..2c43e69ac38 100644
--- a/TAO/tests/Param_Test/server.cpp
+++ b/TAO/tests/Param_Test/server.cpp
@@ -61,15 +61,16 @@ main (int argc, char *argv[])
PortableServer::POA_var oa_ptr;
Param_Test_i *param_test = 0;
- TAO_TRY
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
{
char *orb_name = "internet"; // unused by TAO
CORBA::Object_var temp; // holder for the myriad of times we get
// an object which we then have to narrow.
// get the underlying ORB
- CORBA::ORB_var orb_ptr = CORBA::ORB_init (argc, argv, orb_name, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ CORBA::ORB_var orb_ptr = CORBA::ORB_init (argc, argv, orb_name, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Get the Root POA
@@ -79,21 +80,21 @@ main (int argc, char *argv[])
"(%P|%t) Unable to get root poa reference.\n"),
1);
- oa_ptr = PortableServer::POA::_narrow (temp.in(), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ oa_ptr = PortableServer::POA::_narrow (temp.in(), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
PortableServer::POAManager_var poa_manager =
- oa_ptr->the_POAManager (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ oa_ptr->the_POAManager (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::PolicyList policies (2);
policies.length (2);
policies[0] =
oa_ptr->create_id_assignment_policy (PortableServer::USER_ID,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
policies[1] =
oa_ptr->create_lifespan_policy (PortableServer::PERSISTENT,
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
// We use a different POA, otherwise the user would have to
// change the object key each time it invokes the server.
@@ -101,8 +102,8 @@ main (int argc, char *argv[])
oa_ptr->create_POA ("child_poa",
poa_manager.in (),
policies,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Parse remaining command line and verify parameters.
parse_args (argc, argv);
@@ -118,19 +119,20 @@ main (int argc, char *argv[])
PortableServer::string_to_ObjectId ("param_test");
good_poa->activate_object_with_id (id.in (),
param_test,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Stringify the objref we'll be implementing, and print it to
// stdout. Someone will take that string and give it to a
// client. Then release the object.
- temp = good_poa->id_to_reference (id.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ temp = good_poa->id_to_reference (id.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::String_var str =
orb_ptr->object_to_string (temp.in (),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "(%P|%t) The IOR is <%s>\n", str.in ()));
if (ior_output_file)
@@ -141,35 +143,33 @@ main (int argc, char *argv[])
// Make the POAs controlled by this manager active
- poa_manager->activate (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ poa_manager->activate (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (orb_ptr->run () == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1);
good_poa->destroy (1,
1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
oa_ptr->destroy (1,
1,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCH (CORBA::SystemException, sysex)
{
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("System Exception");
+ ACE_PRINT_EXCEPTION (sysex, "System Exception");
return -1;
}
- TAO_CATCH (CORBA::UserException, userex)
+ ACE_CATCH (CORBA::UserException, userex)
{
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("User Exception");
+ ACE_PRINT_EXCEPTION (userex, "User Exception");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
// Free resources
delete param_test;
diff --git a/TAO/tests/Param_Test/short.cpp b/TAO/tests/Param_Test/short.cpp
index 93af144a915..95bc8cb298e 100644
--- a/TAO/tests/Param_Test/short.cpp
+++ b/TAO/tests/Param_Test/short.cpp
@@ -44,20 +44,17 @@ Test_Short::opname (void) const
void
Test_Short::dii_req_invoke (CORBA::Request *req,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
- req->invoke (env);
+ req->invoke (ACE_TRY_ENV);
}
int
-Test_Short::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Short::init_parameters (Param_Test_ptr /*objref*/,
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
this->in_ = gen->gen_short ();
this->inout_ = 0;
return 0;
@@ -74,20 +71,20 @@ Test_Short::reset_parameters (void)
int
Test_Short::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
this->ret_ = objref->test_short (this->in_,
this->inout_,
this->out_,
- env);
+ ACE_TRY_ENV);
- return (env.exception () ? -1:0);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Short::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
// we provide top level memory to the ORB to retrieve the data
CORBA::Any in_arg (CORBA::_tc_short,
@@ -106,24 +103,24 @@ Test_Short::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value. Let the ORB allocate storage. We simply tell the ORB
// what type we are expecting.
- retval->item (0, env)->value ()->replace (CORBA::_tc_short,
- &this->ret_,
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (CORBA::_tc_short,
+ &this->ret_,
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -139,9 +136,8 @@ Test_Short::check_validity (void)
}
CORBA::Boolean
-Test_Short::check_validity (CORBA::Request_ptr req)
+Test_Short::check_validity (CORBA::Request_ptr /*req*/)
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/typecode.cpp b/TAO/tests/Param_Test/typecode.cpp
index 38804b3de07..90f16ff0c32 100644
--- a/TAO/tests/Param_Test/typecode.cpp
+++ b/TAO/tests/Param_Test/typecode.cpp
@@ -51,7 +51,7 @@ Test_TypeCode::dii_req_invoke (CORBA::Request *req,
int
Test_TypeCode::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &/*ACE_TRY_ENV*/)
{
static CORBA::TypeCode_ptr tc_table [] =
{
@@ -91,20 +91,20 @@ Test_TypeCode::reset_parameters (void)
int
Test_TypeCode::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::TypeCode_out out (this->out_);
this->ret_ = objref->test_typecode (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_TypeCode::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (CORBA::_tc_TypeCode,
&this->in_,
@@ -122,33 +122,34 @@ Test_TypeCode::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (CORBA::_tc_TypeCode,
- &this->ret_,
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (CORBA::_tc_TypeCode,
+ &this->ret_,
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
CORBA::Boolean
Test_TypeCode::check_validity (void)
{
- CORBA::Environment env;
- if (this->in_.in ()->equal (this->inout_.in (), env) &&
- this->in_.in ()->equal (this->out_.in (), env) &&
- this->in_.in ()->equal (this->ret_.in (), env))
+ //CORBA::Environment env;
+ ACE_DECLARE_NEW_CORBA_ENV;
+ if (this->in_.in ()->equal (this->inout_.in (), ACE_TRY_ENV) &&
+ this->in_.in ()->equal (this->out_.in (), ACE_TRY_ENV) &&
+ this->in_.in ()->equal (this->ret_.in (), ACE_TRY_ENV))
return 1;
else
return 0;
diff --git a/TAO/tests/Param_Test/ub_any_seq.cpp b/TAO/tests/Param_Test/ub_any_seq.cpp
index 1bbd3b7c7b4..26e160ef039 100644
--- a/TAO/tests/Param_Test/ub_any_seq.cpp
+++ b/TAO/tests/Param_Test/ub_any_seq.cpp
@@ -57,7 +57,7 @@ Test_AnySeq::dii_req_invoke (CORBA::Request *req,
int
Test_AnySeq::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Generator *gen = GENERATOR::instance (); // value generator
@@ -92,24 +92,22 @@ Test_AnySeq::init_parameters (Param_Test_ptr objref,
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "setting coffee object \n" ));
- TAO_TRY
+ ACE_TRY
{
// get access to a Coffee Object
- Coffee_var cobj = objref->make_coffee (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ Coffee_var cobj = objref->make_coffee (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// insert the coffee object into the Any
this->in_[i] <<= cobj.in ();
this->inout_[i] <<= 0; // different from in_
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCH (CORBA::SystemException, sysex)
{
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception
- ("System Exception doing make_coffee");
+ ACE_PRINT_EXCEPTION (sysex,"System Exception doing make_coffee");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
break;
case 3:
@@ -176,20 +174,20 @@ Test_AnySeq::reset_parameters (void)
int
Test_AnySeq::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::AnySeq_out out (this->out_.out ());
this->ret_ = objref->test_anyseq (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_AnySeq::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_AnySeq,
(void *) &this->in_.in (),
@@ -207,24 +205,25 @@ Test_AnySeq::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_AnySeq,
- // see above
- &this->ret_.inout (),
- // does not own
- 0, env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_AnySeq,
+ // see above
+ &this->ret_.inout (),
+ // does not own
+ 0,
+ ACE_TRY_ENV);
return 0;
}
diff --git a/TAO/tests/Param_Test/ub_long_seq.cpp b/TAO/tests/Param_Test/ub_long_seq.cpp
index f5159ce8b43..7eca8262399 100644
--- a/TAO/tests/Param_Test/ub_long_seq.cpp
+++ b/TAO/tests/Param_Test/ub_long_seq.cpp
@@ -54,14 +54,11 @@ Test_Long_Sequence::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Long_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Long_Sequence::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &/*ACE_TRY_ENV*/)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
// get some sequence length (not more than 10)
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
@@ -88,20 +85,20 @@ Test_Long_Sequence::reset_parameters (void)
int
Test_Long_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Long_Seq_out out (this->out_.out ());
this->ret_ = objref->test_long_sequence (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Long_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Long_Seq,
(void *) &this->in_.in (),
@@ -119,23 +116,23 @@ Test_Long_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Long_Seq,
- &this->ret_.inout (), // see above
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Long_Seq,
+ &this->ret_.inout (), // see above
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -162,9 +159,8 @@ Test_Long_Sequence::check_validity (void)
}
CORBA::Boolean
-Test_Long_Sequence::check_validity (CORBA::Request_ptr req)
+Test_Long_Sequence::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/ub_objref_seq.cpp b/TAO/tests/Param_Test/ub_objref_seq.cpp
index d8b95672b73..fd95f5ce090 100644
--- a/TAO/tests/Param_Test/ub_objref_seq.cpp
+++ b/TAO/tests/Param_Test/ub_objref_seq.cpp
@@ -65,7 +65,7 @@ Test_ObjRef_Sequence::dii_req_invoke (CORBA::Request *req,
int
Test_ObjRef_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Coffee::Desc desc;
Generator *gen = GENERATOR::instance (); // value generator
@@ -80,23 +80,23 @@ Test_ObjRef_Sequence::init_parameters (Param_Test_ptr objref,
{
// generate some arbitrary string to be filled into the ith location in
// the sequence
- this->in_[i] = objref->make_coffee (env);
- if (env.exception ())
+ this->in_[i] = objref->make_coffee (ACE_TRY_ENV);
+ if (ACE_TRY_ENV.exception ())
{
- env.print_exception ("make_coffee");
- return -1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "make cofee \n"), -1);
}
// select a Coffee flavor at random
CORBA::ULong index = (CORBA::ULong) (gen->gen_long () % 6);
desc.name = Coffee_Flavor [index];
// set the attribute for the in object
Coffee_ptr tmp = this->in_[i];
- tmp->description (desc, env);
+ tmp->description (desc, ACE_TRY_ENV);
- if (env.exception ())
+ if (ACE_TRY_ENV.exception ())
{
- env.print_exception ("set coffee attribute");
- return -1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "set cofee attribute \n"), -1);
}
}
return 0;
@@ -113,7 +113,7 @@ Test_ObjRef_Sequence::reset_parameters (void)
int
Test_ObjRef_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Coffee_Mix_out out (this->out_.out ());
// ACE_DEBUG ((LM_DEBUG, "test_coffe_mix (IN):\n"));
@@ -121,14 +121,14 @@ Test_ObjRef_Sequence::run_sii_test (Param_Test_ptr objref,
this->ret_ = objref->test_coffe_mix (this->in_,
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_ObjRef_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Coffee_Mix,
(void *) &this->in_,
@@ -146,30 +146,32 @@ Test_ObjRef_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Coffee_Mix,
- &this->ret_.inout (),
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Coffee_Mix,
+ &this->ret_.inout (),
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
CORBA::Boolean
Test_ObjRef_Sequence::check_validity (void)
{
- TAO_TRY
+ ACE_DECLARE_NEW_CORBA_ENV;
+
+ ACE_TRY
{
// ACE_DEBUG ((LM_DEBUG, "IN: \n"));
// this->print_sequence (this->in_);
@@ -180,38 +182,34 @@ Test_ObjRef_Sequence::check_validity (void)
// ACE_DEBUG ((LM_DEBUG, "OUT: \n"));
// this->print_sequence (this->out_.in ());
- if (this->compare (this->in_,
- this->inout_.in (),
- TAO_TRY_ENV))
- {
- TAO_CHECK_ENV;
- if (this->compare (this->in_,
- this->out_.in (),
- TAO_TRY_ENV))
- {
- TAO_CHECK_ENV;
- if (this->compare (this->in_,
- this->ret_.in (),
- TAO_TRY_ENV))
- {
- TAO_CHECK_ENV;
- return 1;
- }
- }
- }
- return 0;
+ this->compare (this->in_,
+ this->inout_.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ this->compare (this->in_,
+ this->out_.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ this->compare (this->in_,
+ this->ret_.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
return 0;
}
- TAO_ENDTRY_RETURN (0);
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (0);
}
CORBA::Boolean
-Test_ObjRef_Sequence::check_validity (CORBA::Request_ptr req)
+Test_ObjRef_Sequence::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
+ //ACE_UNUSED_ARG (req);
return this->check_validity ();
}
@@ -239,7 +237,7 @@ Test_ObjRef_Sequence::print_values (void)
CORBA::Boolean
Test_ObjRef_Sequence::compare (const Param_Test::Coffee_Mix &s1,
const Param_Test::Coffee_Mix &s2,
- CORBA::Environment& env)
+ CORBA::Environment &ACE_TRY_ENV)
{
if (s1.maximum () != s2.maximum ())
return 0;
@@ -257,16 +255,18 @@ Test_ObjRef_Sequence::compare (const Param_Test::Coffee_Mix &s1,
if (CORBA::is_nil (vs1) || CORBA::is_nil (vs2))
return 0;
- CORBA::String_var n1 = vs1->description (env)->name.in ();
- if (env.exception ())
+ CORBA::String_var n1 = vs1->description (ACE_TRY_ENV)->name.in ();
+ if (ACE_TRY_ENV.exception ())
{
- env.print_exception ("retrieving description for vs1");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "retrieving description for vs1"), -1);
return 0;
}
- CORBA::String_var n2 = vs2->description (env)->name.in ();
- if (env.exception ())
+ CORBA::String_var n2 = vs2->description (ACE_TRY_ENV)->name.in ();
+ if (ACE_TRY_ENV.exception ())
{
- env.print_exception ("retrieving description for vs2");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "retrieving description for vs2"), -1);
return 0;
}
if (ACE_OS::strcmp(n1.in (), n2.in ()) != 0)
diff --git a/TAO/tests/Param_Test/ub_short_seq.cpp b/TAO/tests/Param_Test/ub_short_seq.cpp
index 445ca74fdb7..6bea60fdb72 100644
--- a/TAO/tests/Param_Test/ub_short_seq.cpp
+++ b/TAO/tests/Param_Test/ub_short_seq.cpp
@@ -55,13 +55,10 @@ Test_Short_Sequence::dii_req_invoke (CORBA::Request *req,
int
Test_Short_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
// get some sequence length (not more than 10)
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
@@ -90,20 +87,20 @@ Test_Short_Sequence::reset_parameters (void)
int
Test_Short_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Short_Seq_out out (this->out_.out ());
this->ret_ = objref->test_short_sequence (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Short_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Short_Seq,
(void *) &this->in_.in (),
@@ -121,24 +118,24 @@ Test_Short_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Short_Seq,
- &this->ret_.inout (), // see above
- 0, // does not own
- env);
- return 0;
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Short_Seq,
+ &this->ret_.inout (), // see above
+ 0, // does not own
+ ACE_TRY_ENV);
+return 0;
}
CORBA::Boolean
@@ -164,9 +161,8 @@ Test_Short_Sequence::check_validity (void)
}
CORBA::Boolean
-Test_Short_Sequence::check_validity (CORBA::Request_ptr req)
+Test_Short_Sequence::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/ub_str_seq.cpp b/TAO/tests/Param_Test/ub_str_seq.cpp
index 708ac36351f..3d5f431d407 100644
--- a/TAO/tests/Param_Test/ub_str_seq.cpp
+++ b/TAO/tests/Param_Test/ub_str_seq.cpp
@@ -54,12 +54,9 @@ Test_String_Sequence::dii_req_invoke (CORBA::Request *req,
}
int
-Test_String_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_String_Sequence::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
const char *choiceList[] =
{
"one",
@@ -94,20 +91,20 @@ Test_String_Sequence::reset_parameters (void)
int
Test_String_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::StrSeq_out out (this->out_.out ());
this->ret_ = objref->test_strseq (this->in_.in (),
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_String_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_StrSeq,
(void *) &this->in_.in (),
@@ -125,23 +122,23 @@ Test_String_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_StrSeq,
- &this->ret_.inout (), // see above
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_StrSeq,
+ &this->ret_.inout (), // see above
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -168,9 +165,8 @@ Test_String_Sequence::check_validity (void)
}
CORBA::Boolean
-Test_String_Sequence::check_validity (CORBA::Request_ptr req)
+Test_String_Sequence::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/ub_string.cpp b/TAO/tests/Param_Test/ub_string.cpp
index 64acaefaf22..fe076ce293f 100644
--- a/TAO/tests/Param_Test/ub_string.cpp
+++ b/TAO/tests/Param_Test/ub_string.cpp
@@ -62,12 +62,11 @@ Test_Unbounded_String::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Unbounded_String::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Unbounded_String::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
+
// release any previously occupied values
CORBA::string_free (this->in_);
@@ -98,20 +97,20 @@ Test_Unbounded_String::reset_parameters (void)
int
Test_Unbounded_String::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::String_out str_out (this->out_);
this->ret_ = objref->test_unbounded_string (this->in_,
this->inout_,
str_out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Unbounded_String::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
// create the parmaters
CORBA::Any in_arg (CORBA::_tc_string,
@@ -130,23 +129,23 @@ Test_Unbounded_String::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (CORBA::_tc_string,
- &this->ret_,
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (CORBA::_tc_string,
+ &this->ret_,
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -166,11 +165,10 @@ Test_Unbounded_String::check_validity (void)
}
CORBA::Boolean
-Test_Unbounded_String::check_validity (CORBA::Request_ptr req)
+Test_Unbounded_String::check_validity (CORBA::Request_ptr )
{
// No need to retrieve anything because, for all the args and
// the return, we provided the memory and we own it.
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/ub_struct_seq.cpp b/TAO/tests/Param_Test/ub_struct_seq.cpp
index 8a22e29c037..d7511d6e6c5 100644
--- a/TAO/tests/Param_Test/ub_struct_seq.cpp
+++ b/TAO/tests/Param_Test/ub_struct_seq.cpp
@@ -55,14 +55,11 @@ Test_Struct_Sequence::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Struct_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Struct_Sequence::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
// get some sequence length (not more than 10)
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
@@ -91,20 +88,20 @@ Test_Struct_Sequence::reset_parameters (void)
int
Test_Struct_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::StructSeq_out out (this->out_.out ());
this->ret_ = objref->test_struct_sequence (this->in_,
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Struct_Sequence::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_StructSeq,
&this->in_,
@@ -122,23 +119,23 @@ Test_Struct_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_StructSeq,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_StructSeq,
&this->ret_.inout (), // see above
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -154,9 +151,8 @@ Test_Struct_Sequence::check_validity (void)
}
CORBA::Boolean
-Test_Struct_Sequence::check_validity (CORBA::Request_ptr req)
+Test_Struct_Sequence::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
@@ -270,14 +266,11 @@ Test_Unbounded_Struct_Sequence::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Unbounded_Struct_Sequence::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Unbounded_Struct_Sequence::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
// get some sequence length (not more than 10)
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
@@ -307,20 +300,20 @@ Test_Unbounded_Struct_Sequence::reset_parameters (void)
int
Test_Unbounded_Struct_Sequence::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::PathSpec_out out (this->out_.out ());
this->ret_ = objref->test_unbounded_struct_sequence (this->in_,
- this->inout_.inout (),
- out,
- env);
- return (env.exception () ? -1:0);
+ this->inout_.inout (),
+ out,
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Unbounded_Struct_Sequence::add_args (CORBA::NVList_ptr param_list,
- CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::NVList_ptr retval,
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_PathSpec,
&this->in_,
@@ -338,23 +331,23 @@ Test_Unbounded_Struct_Sequence::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_PathSpec,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_PathSpec,
&this->ret_.inout (),
0,
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -370,9 +363,8 @@ Test_Unbounded_Struct_Sequence::check_validity (void)
}
CORBA::Boolean
-Test_Unbounded_Struct_Sequence::check_validity (CORBA::Request_ptr req)
+Test_Unbounded_Struct_Sequence::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
@@ -399,7 +391,7 @@ Test_Unbounded_Struct_Sequence::print_values (void)
CORBA::Boolean
Test_Unbounded_Struct_Sequence::compare (const Param_Test::PathSpec &s1,
- const Param_Test::PathSpec &s2)
+ const Param_Test::PathSpec &s2)
{
if (s1.maximum () != s2.maximum ())
return 0;
diff --git a/TAO/tests/Param_Test/ulonglong.cpp b/TAO/tests/Param_Test/ulonglong.cpp
index ba18c156320..7ff4fdea85f 100644
--- a/TAO/tests/Param_Test/ulonglong.cpp
+++ b/TAO/tests/Param_Test/ulonglong.cpp
@@ -46,14 +46,11 @@ Test_ULongLong::dii_req_invoke (CORBA::Request *req,
}
int
-Test_ULongLong::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_ULongLong::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
this->in_ = gen->gen_long ();
this->inout_ = 0;
return 0;
@@ -70,20 +67,20 @@ Test_ULongLong::reset_parameters (void)
int
Test_ULongLong::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
this->ret_ = objref->test_ulonglong (this->in_,
this->inout_,
this->out_,
- env);
+ ACE_TRY_ENV);
- return (env.exception () ? -1:0);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_ULongLong::add_args (CORBA::NVList_ptr param_list,
- CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::NVList_ptr retval,
+ CORBA::Environment &ACE_TRY_ENV)
{
// we provide top level memory to the ORB to retrieve the data
CORBA::Any in_arg (CORBA::_tc_ulonglong,
@@ -102,24 +99,24 @@ Test_ULongLong::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value. Let the ORB allocate storage. We simply tell the ORB
// what type we are expecting.
- retval->item (0, env)->value ()->replace (CORBA::_tc_ulonglong,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (CORBA::_tc_ulonglong,
&this->ret_,
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -135,9 +132,8 @@ Test_ULongLong::check_validity (void)
}
CORBA::Boolean
-Test_ULongLong::check_validity (CORBA::Request_ptr req)
+Test_ULongLong::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/var_array.cpp b/TAO/tests/Param_Test/var_array.cpp
index 2089c40e242..1b8025bb8f4 100644
--- a/TAO/tests/Param_Test/var_array.cpp
+++ b/TAO/tests/Param_Test/var_array.cpp
@@ -52,13 +52,11 @@ Test_Var_Array::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Var_Array::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Var_Array::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
// fill the in_ array
for (CORBA::ULong i=0; i < Param_Test::DIM2; i++)
@@ -82,20 +80,20 @@ Test_Var_Array::reset_parameters (void)
int
Test_Var_Array::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Var_Array_out out_arr (this->out_.out ());
this->ret_ = objref->test_var_array (this->in_,
this->inout_,
out_arr,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Var_Array::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
// We provide the top level memory
// the Any does not own any of these
@@ -115,23 +113,23 @@ Test_Var_Array::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("v1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("v2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("v3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value type
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Var_Array,
- this->ret_.in (),
- 0, // does not own
- env);
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Var_Array,
+ this->ret_.in (),
+ 0, // does not own
+ ACE_TRY_ENV);
return 0;
}
@@ -147,9 +145,8 @@ Test_Var_Array::check_validity (void)
}
CORBA::Boolean
-Test_Var_Array::check_validity (CORBA::Request_ptr req)
+Test_Var_Array::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}
diff --git a/TAO/tests/Param_Test/var_struct.cpp b/TAO/tests/Param_Test/var_struct.cpp
index 10cbdacc681..25ea7fccd89 100644
--- a/TAO/tests/Param_Test/var_struct.cpp
+++ b/TAO/tests/Param_Test/var_struct.cpp
@@ -55,14 +55,11 @@ Test_Var_Struct::dii_req_invoke (CORBA::Request *req,
}
int
-Test_Var_Struct::init_parameters (Param_Test_ptr objref,
- CORBA::Environment &env)
+Test_Var_Struct::init_parameters (Param_Test_ptr ,
+ CORBA::Environment &)
{
Generator *gen = GENERATOR::instance (); // value generator
- ACE_UNUSED_ARG (objref);
- ACE_UNUSED_ARG (env);
-
// get some sequence length (not more than 10)
CORBA::ULong len = (CORBA::ULong) (gen->gen_long () % 10) + 1;
@@ -92,20 +89,20 @@ Test_Var_Struct::reset_parameters (void)
int
Test_Var_Struct::run_sii_test (Param_Test_ptr objref,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
Param_Test::Var_Struct_out out (this->out_.out ());
this->ret_ = objref->test_var_struct (this->in_,
this->inout_.inout (),
out,
- env);
- return (env.exception () ? -1:0);
+ ACE_TRY_ENV);
+ return (ACE_TRY_ENV.exception () ? -1:0);
}
int
Test_Var_Struct::add_args (CORBA::NVList_ptr param_list,
CORBA::NVList_ptr retval,
- CORBA::Environment &env)
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any in_arg (Param_Test::_tc_Var_Struct,
&this->in_,
@@ -123,23 +120,23 @@ Test_Var_Struct::add_args (CORBA::NVList_ptr param_list,
param_list->add_value ("s1",
in_arg,
CORBA::ARG_IN,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s2",
inout_arg,
CORBA::ARG_INOUT,
- env);
+ ACE_TRY_ENV);
param_list->add_value ("s3",
out_arg,
CORBA::ARG_OUT,
- env);
+ ACE_TRY_ENV);
// add return value
- retval->item (0, env)->value ()->replace (Param_Test::_tc_Var_Struct,
+ retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Var_Struct,
&this->ret_.inout (), // see above
0, // does not own
- env);
+ ACE_TRY_ENV);
return 0;
}
@@ -173,9 +170,8 @@ Test_Var_Struct::check_validity (void)
}
CORBA::Boolean
-Test_Var_Struct::check_validity (CORBA::Request_ptr req)
+Test_Var_Struct::check_validity (CORBA::Request_ptr )
{
- ACE_UNUSED_ARG (req);
return this->check_validity ();
}