summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-10 17:22:31 +0000
committermayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-10 17:22:31 +0000
commitd83514d953c4d39e3aab7958ba5a13eeea4bf1bf (patch)
treef05b269f34ad6890f90cc86323677b00d432aac6
parent9d770f1b3b4508871123a5b56dfdbf27cc7cfe4c (diff)
downloadATCD-d83514d953c4d39e3aab7958ba5a13eeea4bf1bf.tar.gz
Wed Jul 10 10:19:25 2002 Mayur Deshpande <mayur@ics.uci.edu>
-rw-r--r--TAO/ChangeLog9
-rw-r--r--TAO/tests/AMH_Exceptions/server.cpp10
2 files changed, 16 insertions, 3 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 4be149f71ab..95cb0f748e5 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,12 @@
+Wed Jul 10 10:19:25 2002 Mayur Deshpande <mayur@ics.uci.edu>
+
+ * tests/AMH_Exceptions/server.cpp (test_method):
+
+ Allocate the exception on the heap. The ExceptionHolder now
+ requires that all exceptions it is constructed with, be allocated
+ on the heap since the ExceptionHolder takes over ownership of
+ the exception and deletes it later.
+
Wed Jul 10 12:19:39 2002 Jeff Parsons <parsons@cs.wustl.edu>
* TAO_IDL/include/utl_identifier.h:
diff --git a/TAO/tests/AMH_Exceptions/server.cpp b/TAO/tests/AMH_Exceptions/server.cpp
index 459ba559681..1716b6ff1f6 100644
--- a/TAO/tests/AMH_Exceptions/server.cpp
+++ b/TAO/tests/AMH_Exceptions/server.cpp
@@ -44,14 +44,18 @@ ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
TAO_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
+ // Throw an overload exception
ACE_DECLARE_NEW_CORBA_ENV;
- // Throw an overload exception
- Test::ServerOverload ts;
- Test::AMH_RoundtripExceptionHolder holder (&ts);
+
+ Test::ServerOverload *ts = new Test::ServerOverload;
+
+ // Calee owns the memory now. Need not delete 'ts'
+ Test::AMH_RoundtripExceptionHolder holder (ts);
ACE_TRY
{
+ ACE_DEBUG ((LM_DEBUG, "Throwing exception\n"));
_tao_rh->test_method_excep (&holder ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}