diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-16 19:41:16 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-16 19:41:16 +0000 |
commit | 6a34c2d673cc56469c14d60d0f21dc8715ea3b98 (patch) | |
tree | b9d2ac9c9429ee677e649b09694628aaa2743890 /TAO | |
parent | 8d8bd66c992e800ca7edd6a79b4d8986cd54ccc4 (diff) | |
download | ATCD-6a34c2d673cc56469c14d60d0f21dc8715ea3b98.tar.gz |
ChangeLogTag:Thu Apr 16 13:28:59 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog-98c | 7 | ||||
-rw-r--r-- | TAO/tao/POA.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/decode.cpp | 33 |
3 files changed, 37 insertions, 9 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index ba43fc84753..5e92812051a 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,5 +1,12 @@ Thu Apr 16 13:28:59 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + * tao/decode.cpp: + An exception was raised if a nil object reference was decoded. + + * tao/POA.cpp: + For debugging purposes we print a message when an exception is + raised on the server side. + * TAO_IDL/be/be_visitor_interface.cpp: Use ACE_NESTED_CLASS macro for collocated classes, this makes the generated code portable between NT and other platforms. diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp index faa39069abc..2b48478e0b3 100644 --- a/TAO/tao/POA.cpp +++ b/TAO/tao/POA.cpp @@ -2550,6 +2550,12 @@ TAO_POA::dispatch_servant_i (const TAO_ObjectKey &key, context, env); + if (env.exception () != 0) + { + ACE_DEBUG ((LM_DEBUG, "Servant raised exception: \n")); + env.print_exception ("detected in POA::dispatch"); + } + // Cleanup from upcall poa->post_invoke (servant, operation, diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp index a344f721221..3b941dba6fd 100644 --- a/TAO/tao/decode.cpp +++ b/TAO/tao/decode.cpp @@ -471,19 +471,25 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr, *(CORBA::Object_ptr *) data = CORBA::Object::_nil (); CORBA::string_free (type_hint); type_hint = 0; + return CORBA_TypeCode::TRAVERSE_CONTINUE; } else - while (profiles-- != 0 && continue_decoding) + while (profiles-- != 0 && objdata == 0) { + // We keep decoding until we find a valid IIOP profile. CORBA::ULong tag; // get the profile ID tag if ( (continue_decoding = stream->read_ulong (tag)) == CORBA::B_FALSE) - continue; + { + ACE_DEBUG ((LM_DEBUG, "cannot read profile tag\n")); + continue; + } if (tag != TAO_IOP_TAG_INTERNET_IOP || objdata != 0) { continue_decoding = stream->skip_string (); + ACE_DEBUG ((LM_DEBUG, "unknown tag %d skipping\n", tag)); continue; } @@ -495,11 +501,14 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr, CORBA::ULong encap_len; // ProfileData is encoded as a sequence of octet. So first get // the length of the sequence. - // Create the decoding stream from the encapsulation in the - // buffer, and skip the encapsulation. if ( (continue_decoding = stream->read_ulong (encap_len)) == CORBA::B_FALSE) - continue; + { + ACE_DEBUG ((LM_DEBUG, "cannot read encap length\n")); + continue; + } + // Create the decoding stream from the encapsulation in the + // buffer, and skip the encapsulation. TAO_InputCDR str (*stream, encap_len); continue_decoding = @@ -507,7 +516,12 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr, && stream->skip_bytes(encap_len); if (!continue_decoding) - continue; + { + ACE_DEBUG ((LM_DEBUG, + "problem decoding encapsulated stream, " + "len = %d\n", encap_len)); + continue; + } // Ownership of type_hint is given to IIOP_Object ACE_NEW_RETURN (objdata, @@ -543,7 +557,7 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr, || !str.read_ushort (profile->port)) { env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - dmsg ("error decoding IIOP host/port"); + ACE_DEBUG ((LM_DEBUG, "error decoding IIOP host/port")); objdata->Release (); return CORBA::TypeCode::TRAVERSE_STOP; } @@ -571,8 +585,9 @@ TAO_Marshal_ObjRef::decode (CORBA::TypeCode_ptr, if (objdata == 0) { env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - dmsg2 ("no IIOP v%d.%d (or earlier) profile in IOR!", - IIOP::MY_MAJOR, IIOP::MY_MINOR); + ACE_DEBUG ((LM_DEBUG, "objdata is 0, maybe because " + "no IIOP v%d.%d (or earlier) profile in IOR!\n", + IIOP::MY_MAJOR, IIOP::MY_MINOR )); return CORBA::TypeCode::TRAVERSE_STOP; } else |