summaryrefslogtreecommitdiff
path: root/TAO/tao/Environment.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-06 19:07:10 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-06 19:07:10 +0000
commite459d9e9dc09eaef24155467c9c0117d87f7c037 (patch)
treec28ea328650ea67f27a3f666eb3aebe43b9c0d56 /TAO/tao/Environment.cpp
parent6dd8ac29ddd5613ce5f78e64c779ec09464a7f41 (diff)
downloadATCD-e459d9e9dc09eaef24155467c9c0117d87f7c037.tar.gz
ChangeLogTag:Sun Jun 6 14:04:43 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Environment.cpp')
-rw-r--r--TAO/tao/Environment.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp
index 3f6be977140..fbefa9c59f3 100644
--- a/TAO/tao/Environment.cpp
+++ b/TAO/tao/Environment.cpp
@@ -172,7 +172,15 @@ int
CORBA::Environment::exception_type (void) const
{
// @@ Carlos, is this stuff that's properly "transformed" for EBCDIC
- // platforms?!
+ // platforms?!
+ // @@ Doug: Yes, they are used to compare against the _id() of the
+ // exception, which should have been mappend to the native
+ // codeset. Notice the "should" we haven't tried that stuff yet,
+ // and i find it hard to keep track of all the transformations
+ // going on, specially for the TypeCodes that are generated by
+ // the IDL compiler vs. the ones hard-coded in
+ // $TAO_ROOT/tao/Typecode_Constants.cpp
+
static char sysex_prefix [] = "IDL:omg.org/CORBA/";
static char typecode_extra [] = "TypeCode/";
static char poa_prefix [] = "IDL:PortableServer/";
@@ -259,11 +267,12 @@ CORBA_Environment_var &
CORBA_Environment_var::operator= (const CORBA_Environment_var &r)
{
if (this->ptr_ != 0)
- delete this->ptr_;
+ {
+ delete this->ptr_;
+ this->ptr_ = 0;
+ }
- // @@ Carlos, shouldn't we be checking for "new" failure? If so,
- // shouldn't we not be passing back *this but instead make this a
- // "void" function?
- this->ptr_ = new CORBA::Environment (*r.ptr_);
+ ACE_NEW_RETURN (this->ptr_,
+ CORBA::Environment (*r.ptr_), *this);
return *this;
}