summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1997-11-03 01:37:03 +0000
committergokhale <asgokhale@users.noreply.github.com>1997-11-03 01:37:03 +0000
commit71bc9cdf134dd13824f2fc21aad86cc773ceb1d9 (patch)
tree924e07437c71e188a688c8f395dceaf8d1f961f4
parent63ac6ef0cdbee3724c739df24c1343db64b5206a (diff)
downloadATCD-71bc9cdf134dd13824f2fc21aad86cc773ceb1d9.tar.gz
Moved print_Exception to Environemnt class
CVS: CVS: CVS: CVS: CVS: CVS:
-rw-r--r--TAO/tao/encode.cpp127
-rw-r--r--TAO/tao/except.cpp69
-rw-r--r--TAO/tao/except.h16
-rw-r--r--TAO/tao/giop.cpp11
4 files changed, 113 insertions, 110 deletions
diff --git a/TAO/tao/encode.cpp b/TAO/tao/encode.cpp
index c2d83c6ba71..502108f7c43 100644
--- a/TAO/tao/encode.cpp
+++ b/TAO/tao/encode.cpp
@@ -2,7 +2,7 @@
//
// = LIBRARY
// TAO
-//
+//
// = FILENAME
// encode.cpp
//
@@ -16,7 +16,7 @@
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems Inc.
// and Aniruddha Gokhale
-//
+//
// ============================================================================
#if 0
@@ -31,7 +31,7 @@
#if defined (HAVE_WIDEC_H)
# include <widec.h>
#else
-extern "C"
+extern "C"
{
u_int wslen (const CORBA::WChar *);
CORBA::WChar *wscpy (CORBA::WChar *, const CORBA::WChar *);
@@ -57,7 +57,7 @@ TAO_Marshal_Primitive::encode (CORBA::TypeCode_ptr tc,
CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
switch (tc->_kind)
{
@@ -100,7 +100,7 @@ TAO_Marshal_Primitive::encode (CORBA::TypeCode_ptr tc,
if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
&& continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Primitive::encode detected error");
@@ -121,16 +121,16 @@ TAO_Marshal_Any::encode (CORBA::TypeCode_ptr,
CORBA::TypeCode_ptr elem_tc;
// Value maintained by the Any.
- void *value;
+ void *value;
CORBA::Boolean continue_encoding = CORBA::B_TRUE;
// Context is the CDR stream.
- CDR *stream = (CDR *) context;
+ CDR *stream = (CDR *) context;
- // Status of encode operation
+ // Status of encode operation
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
+ CORBA::TypeCode::TRAVERSE_CONTINUE;
elem_tc = any->type ();
@@ -197,7 +197,7 @@ TAO_Marshal_Any::encode (CORBA::TypeCode_ptr,
if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
&& continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Any::encode detected error");
@@ -223,7 +223,7 @@ TAO_Marshal_TypeCode::encode (CORBA::TypeCode_ptr,
if (continue_encoding == CORBA::B_TRUE)
{
// now encode the parameters, if any
- switch (tc2->_kind)
+ switch (tc2->_kind)
{
// Most TypeCodes have empty parameter lists
default:
@@ -263,7 +263,7 @@ TAO_Marshal_TypeCode::encode (CORBA::TypeCode_ptr,
}
if (continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_TypeCode::encode detected error");
@@ -284,7 +284,7 @@ TAO_Marshal_Principal::encode (CORBA::TypeCode_ptr,
CORBA::Principal_ptr p = *(CORBA::Principal_ptr *) data;
- if (p != 0)
+ if (p != 0)
{
continue_encoding = stream->put_long (p->id.length);
@@ -292,12 +292,12 @@ TAO_Marshal_Principal::encode (CORBA::TypeCode_ptr,
continue_encoding && i < p->id.length;
i++)
continue_encoding = stream->put_octet (p->id.buffer [i]);
- }
+ }
else
continue_encoding = stream->put_long (0);
if (continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Principal::encode detected error");
@@ -322,16 +322,16 @@ TAO_Marshal_ObjRef::encode (CORBA::TypeCode_ptr,
// marshal itself, that will be used.
//
// XXX this doesn't actually verify that the stuff got written
- // OK to the "wire" ...
+ // OK to the "wire" ...
CORBA::Object_ptr obj = (CORBA::Object_ptr) data;
// NIL objrefs ... marshal as empty type hint, no elements.
- if (CORBA::is_nil (obj))
+ if (CORBA::is_nil (obj))
{
continue_encoding =
stream->put_ulong (1) // strlen
- && stream->put_char (0) // NUL
+ && stream->put_char (0) // NUL
&& stream->put_ulong (0); // no profiles
return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
@@ -349,7 +349,7 @@ TAO_Marshal_ObjRef::encode (CORBA::TypeCode_ptr,
IIOP_Object *objdata;
IIOP::ProfileBody *profile;
- if (obj->QueryInterface (IID_IIOP_Object, (void **) &objdata) != NOERROR)
+ if (obj->QueryInterface (IID_IIOP_Object, (void **) &objdata) != NOERROR)
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
return CORBA::TypeCode::TRAVERSE_STOP;
@@ -422,8 +422,8 @@ TAO_Marshal_Struct::encode (CORBA::TypeCode_ptr tc,
{
int member_count = tc->member_count (env);
- for (int i = 0;
- i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ for (int i = 0;
+ i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
&& continue_encoding == CORBA::B_TRUE;
i++)
{
@@ -488,24 +488,24 @@ TAO_Marshal_Struct::encode (CORBA::TypeCode_ptr tc,
break;
}
data = (char *) data + size;
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
- if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
&& continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("marshaling encode_struct detected error");
@@ -538,7 +538,7 @@ TAO_Marshal_Union::encode (CORBA::TypeCode_ptr tc,
CORBA::Boolean discrim_matched = CORBA::B_FALSE;
// encode the discriminator value
- CORBA::TypeCode::traverse_status retval =
+ CORBA::TypeCode::traverse_status retval =
stream->encode (discrim_tc, data, data2, env);
if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
@@ -547,7 +547,7 @@ TAO_Marshal_Union::encode (CORBA::TypeCode_ptr tc,
if (env.exception () == 0)
{
discrim_val = data; // save the pointer to the discriminator
- // value
+ // value
// move the pointer to point to the actual value
data = (char *) data + discrim_size_with_pad;
data2 = (char *) data2 + discrim_size_with_pad;
@@ -622,7 +622,7 @@ TAO_Marshal_Union::encode (CORBA::TypeCode_ptr tc,
dmsg1 ("Union::encode - error getting member type:%d",i);
return CORBA::TypeCode::TRAVERSE_STOP;
}
-
+
}
else // error getting member label
{
@@ -640,7 +640,7 @@ TAO_Marshal_Union::encode (CORBA::TypeCode_ptr tc,
dmsg ("Union::encode - failed. No match and no default case");
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
+ }
else // error getting member count
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO));
@@ -693,7 +693,7 @@ TAO_Marshal_String::encode (CORBA::TypeCode_ptr tc,
// errors. (OMG-IDL supports languages that don't use the C/C++
// notion of null v. empty strings; nulls aren't part of the OMG-IDL
// string model.)
- if (str != 0)
+ if (str != 0)
{
// Verify string satisfies bounds requirements. We're not so
// permissive as to send messages violating the interface spec
@@ -729,7 +729,7 @@ TAO_Marshal_String::encode (CORBA::TypeCode_ptr tc,
else
return CORBA::TypeCode::TRAVERSE_STOP;
}
- else
+ else
{
// empty string
stream->put_ulong (1);
@@ -746,7 +746,7 @@ TAO_Marshal_Sequence::encode (CORBA::TypeCode_ptr tc,
void *context,
CORBA::Environment &env)
{
- CORBA::Boolean continue_encoding = CORBA::B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context;
CORBA::OctetSeq *seq = (CORBA::OctetSeq *) data;
CORBA::TypeCode::traverse_status retval =
@@ -767,14 +767,14 @@ TAO_Marshal_Sequence::encode (CORBA::TypeCode_ptr tc,
{
// encode only if it is an unbounded sequence or if length is
// less/equal to the bounds
- if (bounds == 0 || len <= bounds)
+ if (bounds == 0 || len <= bounds)
{
bounds = len; // number of times you encode
continue_encoding = stream->put_ulong (seq->length);
- if (continue_encoding && seq->length != 0)
+ if (continue_encoding && seq->length != 0)
{
// get element typecode
- tc2 = tc->content_type (env);
+ tc2 = tc->content_type (env);
if (env.exception () == 0)
{
size = tc2->size (env);
@@ -913,11 +913,11 @@ TAO_Marshal_Sequence::encode (CORBA::TypeCode_ptr tc,
} // within bounds or unbounded
} // no exception computing bounds
} // length is > 0
- else
+ else
{
// length is 0, encode it
continue_encoding = stream->put_ulong (len);
- if (continue_encoding == CORBA::B_TRUE)
+ if (continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
@@ -935,7 +935,7 @@ TAO_Marshal_Array::encode (CORBA::TypeCode_ptr tc,
void *context,
CORBA::Environment &env)
{
- CORBA::Boolean continue_encoding = CORBA::B_TRUE;
+ CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context;
CORBA::TypeCode::traverse_status retval =
CORBA::TypeCode::TRAVERSE_CONTINUE; // return status
@@ -948,7 +948,7 @@ TAO_Marshal_Array::encode (CORBA::TypeCode_ptr tc,
if (env.exception () == 0)
{
// get element typecode.
- CORBA::TypeCode_ptr tc2 = tc->content_type (env);
+ CORBA::TypeCode_ptr tc2 = tc->content_type (env);
if (env.exception () == 0)
{
@@ -1103,14 +1103,14 @@ TAO_Marshal_Alias::encode (CORBA::TypeCode_ptr tc,
CORBA::Boolean continue_encoding = CORBA::B_TRUE;
CDR *stream = (CDR *) context; // context is the CDR stream
CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
+ CORBA::TypeCode::TRAVERSE_CONTINUE; // status of encode operation
char *value = (char *) data;
tc2 = tc->content_type (env);
if (env.exception () == 0)
{
// switch on the data type and handle the cases for primitives here for
- // efficiency rather than calling
+ // efficiency rather than calling
switch (tc2->_kind)
{
case CORBA::tk_null:
@@ -1167,7 +1167,7 @@ TAO_Marshal_Alias::encode (CORBA::TypeCode_ptr tc,
if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
&& continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Alias::encode detected error");
@@ -1197,9 +1197,9 @@ TAO_Marshal_Except::encode (CORBA::TypeCode_ptr tc,
int member_count = tc->member_count (env);
- for (int i = 0;
- i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == CORBA::B_TRUE;
+ for (int i = 0;
+ i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ && continue_encoding == CORBA::B_TRUE;
i++)
{
param = tc->member_type (i, env);
@@ -1262,24 +1262,24 @@ TAO_Marshal_Except::encode (CORBA::TypeCode_ptr tc,
break;
}
data = (char *) data + size;
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
}
- }
- else
+ }
+ else
return CORBA::TypeCode::TRAVERSE_STOP;
- if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
+ if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
&& continue_encoding == CORBA::B_TRUE)
return CORBA::TypeCode::TRAVERSE_CONTINUE;
- else
+ else
{
env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE));
dmsg ("TAO_Marshal_Except detected error");
@@ -1305,7 +1305,7 @@ TAO_Marshal_WString::encode (CORBA::TypeCode_ptr tc,
// errors. (OMG-IDL supports languages that don't use the
// C/C++ notion of null v. empty strings; nulls aren't part of
// the OMG-IDL string model.)
- if (str != 0)
+ if (str != 0)
{
// Verify string satisfies bounds requirements. We're not so
// permissive as to send messages violating the interface spec
@@ -1338,7 +1338,7 @@ TAO_Marshal_WString::encode (CORBA::TypeCode_ptr tc,
else
return CORBA::TypeCode::TRAVERSE_STOP;
}
- else
+ else
{
// empty string
stream->put_ulong (1);
@@ -1346,4 +1346,3 @@ TAO_Marshal_WString::encode (CORBA::TypeCode_ptr tc,
return CORBA::TypeCode::TRAVERSE_CONTINUE;
}
}
-
diff --git a/TAO/tao/except.cpp b/TAO/tao/except.cpp
index 851eabbf7f5..9cd55d8c975 100644
--- a/TAO/tao/except.cpp
+++ b/TAO/tao/except.cpp
@@ -37,7 +37,7 @@ DEFINE_GUID (IID_CORBA_SystemException,
0x77420084, 0xf276, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98);
-CORBA_Exception::CORBA_Exception (CORBA::TypeCode_ptr tc)
+CORBA_Exception::CORBA_Exception (CORBA::TypeCode_ptr tc)
: _type (tc),
refcount_ (1)
{
@@ -47,7 +47,7 @@ CORBA_Exception::CORBA_Exception (CORBA::TypeCode_ptr tc)
assert (refcount_ > 0);
}
-CORBA_Exception::CORBA_Exception (const CORBA_Exception &src)
+CORBA_Exception::CORBA_Exception (const CORBA_Exception &src)
: _type (src._type),
refcount_ (1)
{
@@ -128,7 +128,7 @@ CORBA_Exception::Release (void)
// CORBA::TypeCode_ptr tc = _type->_duplicate ();
- CORBA::Any free_it_all (_type, this, CORBA::B_TRUE);
+ CORBA::Any free_it_all (_type, this, CORBA::B_TRUE);
// tc->Release ();
@@ -157,7 +157,7 @@ CORBA_Exception::QueryInterface (REFIID riid,
// Avoid zillions of not-quite-inlined copies of utilities.
-CORBA_UserException::CORBA_UserException (CORBA::TypeCode_ptr tc)
+CORBA_UserException::CORBA_UserException (CORBA::TypeCode_ptr tc)
: CORBA_Exception (tc)
{
}
@@ -168,7 +168,7 @@ CORBA_UserException::~CORBA_UserException (void)
CORBA_SystemException::CORBA_SystemException (CORBA::TypeCode_ptr tc,
CORBA::ULong code,
- CORBA::CompletionStatus completed)
+ CORBA::CompletionStatus completed)
: _minor (code),
_completed (completed),
CORBA_Exception (tc)
@@ -201,7 +201,7 @@ make_standard_typecode (CORBA::TypeCode_ptr tcp,
static const char *minor = "minor";
static const char *completion = "completion";
- static const unsigned long oc_completion_status [] =
+ static const unsigned long oc_completion_status [] =
{
1, // byte order flag, tricky
0, 0, // type ID omitted
@@ -211,7 +211,7 @@ make_standard_typecode (CORBA::TypeCode_ptr tcp,
0, 0
};
static CORBA::TypeCode
- tc_completion_status (CORBA::tk_enum,
+ tc_completion_status (CORBA::tk_enum,
sizeof oc_completion_status,
(unsigned char *) &oc_completion_status,
CORBA::B_FALSE);
@@ -238,24 +238,24 @@ make_standard_typecode (CORBA::TypeCode_ptr tcp,
assert (strlen (full_id) <= sizeof full_id);
if (stream.put_byte (MY_BYTE_SEX) != CORBA::B_TRUE
- || stream.encode (CORBA::_tc_string,
- &strptr, 0,
+ || stream.encode (CORBA::_tc_string,
+ &strptr, 0,
env) != CORBA::TypeCode::TRAVERSE_CONTINUE
- || stream.encode (CORBA::_tc_string,
- &name, 0,
+ || stream.encode (CORBA::_tc_string,
+ &name, 0,
env) != CORBA::TypeCode::TRAVERSE_CONTINUE
|| stream.put_ulong (2L) != CORBA::B_TRUE
- || stream.encode (CORBA::_tc_string,
- &minor, 0,
+ || stream.encode (CORBA::_tc_string,
+ &minor, 0,
env) != CORBA::TypeCode::TRAVERSE_CONTINUE
- || stream.encode (CORBA::_tc_TypeCode,
- &CORBA::_tc_ulong, 0,
+ || stream.encode (CORBA::_tc_TypeCode,
+ &CORBA::_tc_ulong, 0,
env) != CORBA::TypeCode::TRAVERSE_CONTINUE
- || stream.encode (CORBA::_tc_string,
- &completion, 0,
+ || stream.encode (CORBA::_tc_string,
+ &completion, 0,
env) != CORBA::TypeCode::TRAVERSE_CONTINUE
- || stream.encode (CORBA::_tc_TypeCode,
- &completion_status, 0,
+ || stream.encode (CORBA::_tc_TypeCode,
+ &completion_status, 0,
env) != CORBA::TypeCode::TRAVERSE_CONTINUE) {
env.exception (new CORBA_INITIALIZE (CORBA::COMPLETED_NO));
return;
@@ -332,7 +332,7 @@ __TC_init_standard_exceptions (CORBA::Environment &env)
__system_exceptions.length = 0;
__system_exceptions.maximum = NUM_SYS_EXCEPTIONS;
__system_exceptions.buffer = &sys_exceptions [0];
-
+
// Initialize the typecodes.
#define SYSEX(name) \
if (env.exception () == 0) \
@@ -349,7 +349,7 @@ __TC_init_standard_exceptions (CORBA::Environment &env)
// Static initialization of the two user-defined exceptions that
// are part of the ORB.
-static CORBA::Octet tc_buf_Bounds [] =
+static CORBA::Octet tc_buf_Bounds [] =
{
0, 0, 0, 0, // big endian, padded
0, 0, 0, 38, // strlen (id) + 1
@@ -368,13 +368,13 @@ static CORBA::Octet tc_buf_Bounds [] =
static CORBA::TypeCode tc_std_Bounds (CORBA::tk_except,
sizeof tc_buf_Bounds,
- tc_buf_Bounds,
+ tc_buf_Bounds,
CORBA::B_FALSE);
CORBA::TypeCode_ptr CORBA::_tc_Bounds = &tc_std_Bounds;
-static CORBA::Octet tc_buf_BadKind [] =
-{
+static CORBA::Octet tc_buf_BadKind [] =
+{
0, 0, 0, 0, // big endian, padded
0, 0, 0, 39, // strlen (id) + 1
'I', 'D', 'L', ':',
@@ -390,9 +390,9 @@ static CORBA::Octet tc_buf_BadKind [] =
0, 0, 0, 0 // no members to this typecode
};
-static CORBA::TypeCode tc_std_BadKind (CORBA::tk_except,
+static CORBA::TypeCode tc_std_BadKind (CORBA::tk_except,
sizeof tc_buf_BadKind,
- tc_buf_BadKind,
+ tc_buf_BadKind,
CORBA::B_FALSE);
CORBA::TypeCode_ptr CORBA::_tc_BadKind = &tc_std_BadKind;
@@ -424,14 +424,11 @@ CORBA::Environment::exception_type (void) const
// Diagnostic utility routine: describe the exception onto
// the standard I/O stream passed as a parameter.
//
-// XXX make this a member function on "Environment"
-
-void ACE_Svc_Export
-print_exception (const CORBA::Exception *x,
- const char *info,
- FILE *)
+void
+CORBA::Environment::print_exception (const char *info,
+ FILE *)
{
- CORBA::String id = x->id ();
+ CORBA::String id = this->_exception->id ();
ACE_DEBUG ((LM_ERROR, "(%P|%t) EXCEPTION, %s\n", info));
@@ -439,10 +436,10 @@ print_exception (const CORBA::Exception *x,
// on Exception to say if it's user or system exception.
if (ACE_OS::strncmp ((char *) id, "IDL:omg.org/CORBA/", 10) == 0
- && ACE_OS::strncmp ((char *) id, "IDL:omg.org/CORBA/TypeCode/", 19) != 0)
+ && ACE_OS::strncmp ((char *) id, "IDL:omg.org/CORBA/TypeCode/", 19) != 0)
{
// XXX this should be a QueryInterface call instead
- CORBA::SystemException *x2 = (CORBA::SystemException *) x;
+ CORBA::SystemException *x2 = (CORBA::SystemException *) this->_exception;
// XXX there are a other few "user exceptions" in the CORBA
// scope, they're not all standard/system exceptions ... really
@@ -459,7 +456,7 @@ print_exception (const CORBA::Exception *x,
(x2->completion () == CORBA::COMPLETED_MAYBE) ? "MAYBE" :
"garbage"));
}
- else
+ else
// XXX we can use the exception's typecode to dump all the data
// held within it ...
diff --git a/TAO/tao/except.h b/TAO/tao/except.h
index 57bd01f8c0e..0b95eabeb52 100644
--- a/TAO/tao/except.h
+++ b/TAO/tao/except.h
@@ -4,7 +4,7 @@
//
// = LIBRARY
// TAO
-//
+//
// = FILENAME
// except.h
//
@@ -13,7 +13,7 @@
//
// = AUTHOR
// Copyright 1994-1995 by Sun Microsystems Inc.
-//
+//
// ============================================================================
#if !defined (TAO_EXCEPT_H)
@@ -31,7 +31,7 @@ class ACE_Svc_Export CORBA_Exception : public IUnknown
// CORBA2-specified exception hierarchy.
//
// All exceptions have a type (represented by a TypeCode) and a widely
- // scoped type ID (in the TypeCode) that generated by any OMG-IDL compiler
+ // scoped type ID (in the TypeCode) that generated by any OMG-IDL compiler
// and available through the Interface Repositories. Think of it as a
// "globally scoped" name distinguishing each exception.
public:
@@ -82,7 +82,7 @@ protected:
// Copy and assignment operators.
};
-class ACE_Svc_Export CORBA_SystemException : public CORBA_Exception
+class ACE_Svc_Export CORBA_SystemException : public CORBA_Exception
{
// = TITLE
// System exceptions are those defined in the CORBA spec; OMG-IDL
@@ -157,7 +157,7 @@ SYSEX(DATA_CONVERSION);
#undef SYSEX
-class CORBA_Environment
+class CORBA_Environment
{
// = TITLE
// A CORBA_Environment is a way to automagically ensure that
@@ -178,13 +178,17 @@ public:
void clear (void)
{
- if (_exception)
+ if (_exception)
{
_exception->Release ();
_exception = 0; // XXX
}
}
+ void print_exception (const char *info,
+ FILE *f=stdout);
+ // print the exception to output determined by f
+
private:
CORBA::Exception_ptr _exception;
diff --git a/TAO/tao/giop.cpp b/TAO/tao/giop.cpp
index d4c98a88a5e..8e859287b9f 100644
--- a/TAO/tao/giop.cpp
+++ b/TAO/tao/giop.cpp
@@ -509,7 +509,7 @@ TAO_GIOP_Invocation::TAO_GIOP_Invocation (IIOP_Object *data,
// Copy in only as many bytes are valid, or only as many as we have
// room for, whichever is less. -------> What a friggin' HACK!?!?!
- ACE_OS::memcpy (&this->my_request_id_,
+ ACE_OS::memcpy (&this->my_request_id_,
&me,
ACE_MIN (sizeof (me), sizeof (this->my_request_id_)));
}
@@ -673,9 +673,12 @@ TAO_GIOP_Invocation::start (CORBA::Environment &env)
// Establish the connection and get back a Client_Connection_Handler
if (con->connect (this->handler_, server_addr) == -1)
- // @@ Need to figure out which exception to set...this one is
- // pretty vague.
- env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_NO));
+ {
+ // @@ Need to figure out which exception to set...this one is
+ // pretty vague.
+ env.exception (new CORBA::COMM_FAILURE (CORBA::COMPLETED_NO));
+ return;
+ }
// Use the ACE_SOCK_Stream from the Client_Connection_Handler for
// communication inplace of the endpoint used below.