diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-25 23:05:12 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-25 23:05:12 +0000 |
commit | b887279e7d866c0264662c65e8a8214a81e0c513 (patch) | |
tree | 7ce1a25e1ef273bbe99586a1d560fac15ab7ed8e /TAO/tests/Param_Test/bd_struct_seq.cpp | |
parent | 437fc9812823677da27d385e6464bd5775f6fc4d (diff) | |
download | ATCD-b887279e7d866c0264662c65e8a8214a81e0c513.tar.gz |
Fixed more ACE_TRY ACE_CHECK stuff, but not anything that was causing
a warning.
Diffstat (limited to 'TAO/tests/Param_Test/bd_struct_seq.cpp')
-rw-r--r-- | TAO/tests/Param_Test/bd_struct_seq.cpp | 89 |
1 files changed, 55 insertions, 34 deletions
diff --git a/TAO/tests/Param_Test/bd_struct_seq.cpp b/TAO/tests/Param_Test/bd_struct_seq.cpp index a8b23ebbf19..2f3c50f9d14 100644 --- a/TAO/tests/Param_Test/bd_struct_seq.cpp +++ b/TAO/tests/Param_Test/bd_struct_seq.cpp @@ -118,40 +118,61 @@ Test_Bounded_Struct_Sequence::add_args (CORBA::NVList_ptr param_list, CORBA::NVList_ptr retval, CORBA::Environment &ACE_TRY_ENV) { - CORBA::Any in_arg (Param_Test::_tc_Bounded_StructSeq, - &this->in_, - 0); - - CORBA::Any inout_arg (Param_Test::_tc_Bounded_StructSeq, - &this->inout_.inout (), - 0); - - CORBA::Any out_arg (Param_Test::_tc_Bounded_StructSeq, - &this->out_.inout (), // .out () causes crash - 0); - - // add parameters - param_list->add_value ("s1", - in_arg, - CORBA::ARG_IN, - ACE_TRY_ENV); - - param_list->add_value ("s2", - inout_arg, - CORBA::ARG_INOUT, - ACE_TRY_ENV); - - param_list->add_value ("s3", - out_arg, - CORBA::ARG_OUT, - ACE_TRY_ENV); - - // add return value type - retval->item (0, ACE_TRY_ENV)->value ()->replace (Param_Test::_tc_Bounded_StructSeq, - &this->ret_.inout (), // see above - 0, // does not own - ACE_TRY_ENV); - return 0; + ACE_TRY + { + CORBA::Any in_arg (Param_Test::_tc_Bounded_StructSeq, + &this->in_, + 0); + + CORBA::Any inout_arg (Param_Test::_tc_Bounded_StructSeq, + &this->inout_.inout (), + 0); + + CORBA::Any out_arg (Param_Test::_tc_Bounded_StructSeq, + &this->out_.inout (), // .out () causes crash + 0); + + // add parameters + param_list->add_value ("s1", + in_arg, + CORBA::ARG_IN, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + param_list->add_value ("s2", + inout_arg, + CORBA::ARG_INOUT, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + param_list->add_value ("s3", + out_arg, + CORBA::ARG_OUT, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + // add return value type + CORBA::NamedValue *item = retval->item (0, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + item->value ()->replace (Param_Test::_tc_Bounded_StructSeq, + &this->ret_.inout (), // see above + 0, // does not own + ACE_TRY_ENV); + ACE_TRY_CHECK; + + return 0; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Test_Bounded_Struct_Sequence::add_args\n"); + + return -1; + } + ACE_ENDTRY; + ACE_CHECK_RETURN (-1); } CORBA::Boolean |