summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/param_test_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Param_Test/param_test_i.cpp')
-rw-r--r--TAO/tests/Param_Test/param_test_i.cpp144
1 files changed, 59 insertions, 85 deletions
diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp
index ac068c3b6af..1df042f2caf 100644
--- a/TAO/tests/Param_Test/param_test_i.cpp
+++ b/TAO/tests/Param_Test/param_test_i.cpp
@@ -35,7 +35,6 @@ Coffee_i::~Coffee_i (void)
// get attribute
Coffee::Desc *
Coffee_i::description (CORBA::Environment & /*env*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
Coffee::Desc *desc = new Coffee::Desc;
desc->name = CORBA::string_dup (this->name_);
@@ -46,7 +45,6 @@ Coffee_i::description (CORBA::Environment & /*env*/)
void
Coffee_i::description (const Coffee::Desc &description,
CORBA::Environment & /*env*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
this->name_ = CORBA::string_dup (description.name);
}
@@ -58,8 +56,8 @@ Coffee_i::description (const Coffee::Desc &description,
Param_Test_i::Param_Test_i (const char *coffee_name,
CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)),
- obj_ (coffee_name)
+ : obj_ (coffee_name),
+ orb_ (CORBA::ORB::_duplicate (orb))
{
}
@@ -75,7 +73,6 @@ Param_Test_i::test_short (CORBA::Short s1,
CORBA::Short &s2,
CORBA::Short_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
s2 = s1 * 2;
s3 = s1 * 3;
@@ -88,7 +85,6 @@ Param_Test_i::test_ulonglong (CORBA::ULongLong s1,
CORBA::ULongLong &s2,
CORBA::ULongLong_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
s2 = s1 * 2;
s3 = s1 * 3;
@@ -103,7 +99,6 @@ Param_Test_i::test_unbounded_string (const char *s1,
char *&s2,
CORBA::String_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
char *retstr = CORBA::string_dup (s1);
s3 = CORBA::string_dup (s1);
@@ -122,7 +117,6 @@ Param_Test_i::test_bounded_string (const char *s1,
char *&s2,
CORBA::String_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
char *retstr = CORBA::string_dup (s1);
s3 = CORBA::string_dup (s1);
@@ -139,7 +133,6 @@ 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 &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
s2 = s1;
s3 = s1;
@@ -148,12 +141,12 @@ Param_Test_i::test_fixed_struct (const Param_Test::Fixed_Struct &s1,
// = Sequences
-Param_Test::Long_Seq *
-Param_Test_i::test_long_sequence (const Param_Test::Long_Seq & s1,
- Param_Test::Long_Seq & s2,
- Param_Test::Long_Seq_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Long_Seq * Param_Test_i::test_long_sequence (
+ const Param_Test::Long_Seq & s1,
+ Param_Test::Long_Seq & s2,
+ Param_Test::Long_Seq_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::Long_Seq
*ret = new Param_Test::Long_Seq,
@@ -166,12 +159,12 @@ Param_Test_i::test_long_sequence (const Param_Test::Long_Seq & s1,
return ret;
}
-Param_Test::Short_Seq *
-Param_Test_i::test_short_sequence (const Param_Test::Short_Seq & s1,
- Param_Test::Short_Seq & s2,
- Param_Test::Short_Seq_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Short_Seq * Param_Test_i::test_short_sequence (
+ const Param_Test::Short_Seq & s1,
+ Param_Test::Short_Seq & s2,
+ Param_Test::Short_Seq_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::Short_Seq
*ret = new Param_Test::Short_Seq,
@@ -184,12 +177,12 @@ Param_Test_i::test_short_sequence (const Param_Test::Short_Seq & s1,
return ret;
}
-Param_Test::Bounded_Short_Seq *
-Param_Test_i::test_bounded_short_sequence (const Param_Test::Bounded_Short_Seq & s1,
- Param_Test::Bounded_Short_Seq & s2,
- Param_Test::Bounded_Short_Seq_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Bounded_Short_Seq * Param_Test_i::test_bounded_short_sequence (
+ const Param_Test::Bounded_Short_Seq & s1,
+ Param_Test::Bounded_Short_Seq & s2,
+ Param_Test::Bounded_Short_Seq_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::Bounded_Short_Seq
*ret = new Param_Test::Bounded_Short_Seq,
@@ -202,12 +195,12 @@ Param_Test_i::test_bounded_short_sequence (const Param_Test::Bounded_Short_Seq &
return ret;
}
-Param_Test::Bounded_Long_Seq *
-Param_Test_i::test_bounded_long_sequence (const Param_Test::Bounded_Long_Seq & s1,
- Param_Test::Bounded_Long_Seq & s2,
- Param_Test::Bounded_Long_Seq_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Bounded_Long_Seq * Param_Test_i::test_bounded_long_sequence (
+ const Param_Test::Bounded_Long_Seq & s1,
+ Param_Test::Bounded_Long_Seq & s2,
+ Param_Test::Bounded_Long_Seq_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::Bounded_Long_Seq
*ret = new Param_Test::Bounded_Long_Seq,
@@ -225,7 +218,6 @@ Param_Test_i::test_strseq (const Param_Test::StrSeq &s1,
Param_Test::StrSeq &s2,
Param_Test::StrSeq_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we copy the "in" sequences into all the inout, out and return sequences.
@@ -256,12 +248,12 @@ Param_Test_i::test_strseq (const Param_Test::StrSeq &s1,
return ret;
}
-Param_Test::Bounded_StrSeq *
-Param_Test_i::test_bounded_strseq (const Param_Test::Bounded_StrSeq & s1,
- Param_Test::Bounded_StrSeq & s2,
- Param_Test::Bounded_StrSeq_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Bounded_StrSeq * Param_Test_i::test_bounded_strseq (
+ const Param_Test::Bounded_StrSeq & s1,
+ Param_Test::Bounded_StrSeq & s2,
+ Param_Test::Bounded_StrSeq_out s3,
+ CORBA::Environment &
+ )
{
// we copy the "in" sequences into all the inout, out and return sequences.
@@ -283,7 +275,6 @@ Param_Test_i::test_struct_sequence (const Param_Test::StructSeq &s1,
Param_Test::StructSeq &s2,
Param_Test::StructSeq_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we copy the "in" sequences into all the inout, out and return sequences.
@@ -300,12 +291,12 @@ Param_Test_i::test_struct_sequence (const Param_Test::StructSeq &s1,
return ret;
}
-Param_Test::Bounded_StructSeq *
-Param_Test_i::test_bounded_struct_sequence (const Param_Test::Bounded_StructSeq & s1,
- Param_Test::Bounded_StructSeq & s2,
- Param_Test::Bounded_StructSeq_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Bounded_StructSeq * Param_Test_i::test_bounded_struct_sequence (
+ const Param_Test::Bounded_StructSeq & s1,
+ Param_Test::Bounded_StructSeq & s2,
+ Param_Test::Bounded_StructSeq_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::Bounded_StructSeq
*ret = new Param_Test::Bounded_StructSeq,
@@ -319,12 +310,12 @@ Param_Test_i::test_bounded_struct_sequence (const Param_Test::Bounded_StructSeq
}
-Param_Test::PathSpec *
-Param_Test_i::test_unbounded_struct_sequence (const Param_Test::PathSpec & s1,
- Param_Test::PathSpec & s2,
- Param_Test::PathSpec_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::PathSpec * Param_Test_i::test_unbounded_struct_sequence (
+ const Param_Test::PathSpec & s1,
+ Param_Test::PathSpec & s2,
+ Param_Test::PathSpec_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::PathSpec
*ret = new Param_Test::PathSpec,
@@ -351,12 +342,12 @@ Param_Test_i::test_unbounded_struct_sequence (const Param_Test::PathSpec & s1,
}
-Param_Test::Coffee_Mix *
-Param_Test_i::test_coffe_mix (const Param_Test::Coffee_Mix & s1,
- Param_Test::Coffee_Mix & s2,
- Param_Test::Coffee_Mix_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Coffee_Mix * Param_Test_i::test_coffe_mix (
+ const Param_Test::Coffee_Mix & s1,
+ Param_Test::Coffee_Mix & s2,
+ Param_Test::Coffee_Mix_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::Coffee_Mix
*ret = new Param_Test::Coffee_Mix,
@@ -394,12 +385,12 @@ Param_Test_i::test_coffe_mix (const Param_Test::Coffee_Mix & s1,
return ret;
}
-Param_Test::Bounded_Coffee_Mix *
-Param_Test_i::test_bounded_coffe_mix (const Param_Test::Bounded_Coffee_Mix & s1,
- Param_Test::Bounded_Coffee_Mix & s2,
- Param_Test::Bounded_Coffee_Mix_out s3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+Param_Test::Bounded_Coffee_Mix * Param_Test_i::test_bounded_coffe_mix (
+ const Param_Test::Bounded_Coffee_Mix & s1,
+ Param_Test::Bounded_Coffee_Mix & s2,
+ Param_Test::Bounded_Coffee_Mix_out s3,
+ CORBA::Environment &
+ )
{
Param_Test::Bounded_Coffee_Mix
*ret = new Param_Test::Bounded_Coffee_Mix,
@@ -442,7 +433,6 @@ Param_Test_i::test_anyseq (const Param_Test::AnySeq &s1,
Param_Test::AnySeq &s2,
Param_Test::AnySeq_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we copy the "in" sequences into all the inout, out and return sequences.
@@ -466,7 +456,6 @@ 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 &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we copy the "in" sequences into all the inout, out and return sequences.
@@ -488,7 +477,6 @@ 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 &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we copy the "in" sequences into all the inout, out and return sequences.
@@ -510,7 +498,6 @@ Param_Test_i::test_recursive_struct (const Param_Test::Recursive_Struct &s1,
Param_Test::Recursive_Struct &s2,
Param_Test::Recursive_Struct_out s3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we copy the "in" structs into all the inout, out and return sequences.
@@ -531,7 +518,6 @@ 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 &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we copy the "in" sequences into all the inout, out and return sequences.
@@ -550,7 +536,6 @@ 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 &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
return this->obj_._this (ACE_TRY_ENV);
}
@@ -561,7 +546,6 @@ Param_Test_i::test_objref (Coffee_ptr o1,
Coffee_ptr &o2,
Coffee_out o3,
CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
Coffee_ptr ret = Coffee::_nil ();
@@ -606,7 +590,6 @@ Param_Test_i::test_typecode (CORBA::TypeCode_ptr t1,
CORBA::TypeCode_ptr &t2,
CORBA::TypeCode_out t3,
CORBA::Environment &/*env*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
// we simply assign t1 to the others
CORBA::TypeCode_ptr retval = CORBA::TypeCode::_duplicate (t1);
@@ -621,7 +604,6 @@ Param_Test_i::test_any (const CORBA::Any &a1,
CORBA::Any &a2,
CORBA::Any_out a3,
CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::Any *ret;
CORBA::Short short_in;
@@ -761,7 +743,6 @@ 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 &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
Param_Test::Fixed_Array_slice *ret;
@@ -777,7 +758,6 @@ 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 &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
Param_Test::Var_Array_slice *ret;
@@ -792,10 +772,9 @@ Param_Test_i::test_exception (CORBA::ULong s1,
CORBA::ULong& s2,
CORBA::ULong_out s3,
CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException,
- Param_Test::Ooops))
{
- int d = s1 % 3;
+ int d = this->test_exception_count_ % 3;
+ this->test_exception_count_++;
if (d == 0)
{
s2 = s1 * 2;
@@ -804,7 +783,6 @@ Param_Test_i::test_exception (CORBA::ULong s1,
}
else if (d == 1)
ACE_THROW_RETURN (Param_Test::Ooops (CORBA::string_dup (" % 3 == 1"), s1), 0);
-
ACE_THROW_RETURN (Param_Test::BadBoy (), 0);
}
@@ -813,7 +791,6 @@ 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 &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
Param_Test::Big_Union_var ret (new Param_Test::Big_Union (u1));
u2 = u1;
@@ -825,8 +802,7 @@ CORBA::Any*
Param_Test_i::test_complex_any (const CORBA::Any &a1,
CORBA::Any &a2,
CORBA::Any_out a3,
- CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ CORBA::Environment &ACE_TRY_ENV)
{
CORBA::Any_var ret (new CORBA::Any (a1));
a2 = a1;
@@ -840,7 +816,6 @@ Param_Test_i::test_multdim_array (const Param_Test::Multdim_Array a1,
Param_Test::Multdim_Array a2,
Param_Test::Multdim_Array_out a3,
CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
Param_Test::Multdim_Array_slice *ret;
@@ -854,7 +829,6 @@ Param_Test_i::test_multdim_array (const Param_Test::Multdim_Array a1,
void
Param_Test_i::shutdown (CORBA::Environment &)
- ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown ();
}