summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/Any_SystemException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/AnyTypeCode/Any_SystemException.cpp')
-rw-r--r--TAO/tao/AnyTypeCode/Any_SystemException.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/TAO/tao/AnyTypeCode/Any_SystemException.cpp b/TAO/tao/AnyTypeCode/Any_SystemException.cpp
index 820e411234e..ef44c4ff664 100644
--- a/TAO/tao/AnyTypeCode/Any_SystemException.cpp
+++ b/TAO/tao/AnyTypeCode/Any_SystemException.cpp
@@ -8,13 +8,10 @@
#include "tao/CDR.h"
#include "tao/Exception.h"
-#include "tao/Environment.h"
#include "tao/CORBA_String.h"
#include "tao/SystemException.h"
#include "ace/Auto_Ptr.h"
-#include "ace/CORBA_macros.h"
-#include "ace/Auto_Ptr.h"
ACE_RCSID (AnyTypeCode,
Any_SystemException,
@@ -127,9 +124,12 @@ TAO::Any_SystemException::extract (const CORBA::Any & any,
auto_ptr<TAO::Any_SystemException > replacement_safety (replacement);
// We know this will work since the unencoded case is covered above.
- TAO::Unknown_IDL_Type *unk =
+ TAO::Unknown_IDL_Type * const unk =
dynamic_cast<TAO::Unknown_IDL_Type *> (impl);
+ if (!unk)
+ return false;
+
// We don't want the rd_ptr of unk to move, in case it is
// shared by another Any. This copies the state, not the buffer.
TAO_InputCDR for_reading (unk->_tao_get_cdr ());
@@ -145,11 +145,11 @@ TAO::Any_SystemException::extract (const CORBA::Any & any,
return true;
}
}
- catch ( ::CORBA::Exception&)
+ catch (const ::CORBA::Exception&)
{
}
- return 0;
+ return false;
}
void
@@ -161,6 +161,7 @@ TAO::Any_SystemException::free_value (void)
this->value_destructor_ = 0;
}
+ ::CORBA::release (this->type_);
this->value_ = 0;
}
@@ -178,7 +179,7 @@ TAO::Any_SystemException::marshal_value (TAO_OutputCDR &cdr)
this->value_->_tao_encode (cdr);
return true;
}
- catch ( ::CORBA::Exception&)
+ catch (const ::CORBA::Exception&)
{
}
return false;
@@ -192,7 +193,7 @@ TAO::Any_SystemException::demarshal_value (TAO_InputCDR &cdr)
this->value_->_tao_decode (cdr);
return true;
}
- catch ( ::CORBA::Exception&)
+ catch (const ::CORBA::Exception&)
{
}
return false;