diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-03-18 21:25:21 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-03-18 21:25:21 +0000 |
commit | 18e6cdf7f5ae7318ca258664a196f00dc0e34cd2 (patch) | |
tree | 5de66abfa942c8561f02cb8b31159f278883b8cd | |
parent | 2cebd17a1fa2c27bcdc6dd271ce085bd67a0d769 (diff) | |
download | ATCD-18e6cdf7f5ae7318ca258664a196f00dc0e34cd2.tar.gz |
ChangeLogTag:Sun Mar 18 11:50:57 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 14 | ||||
-rw-r--r-- | TAO/tao/Exception.cpp | 22 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.i | 3 |
3 files changed, 30 insertions, 9 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index e52e53c6994..d4ca7f236e2 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,17 @@ +Sun Mar 18 11:50:57 2001 Ossama Othman <ossama@uci.edu> + + * tao/Exception.cpp (_info): + + Fixed exception informational message so that it displays the + properly masked TAO and OMG minor codes, rather than the raw + minor codes. The masked minor codes are more meaningful. + + * tao/ORB_Core.i (check_shutdown): + + Bitwise-OR the minor code in the CORBA::BAD_INV_ORDER() + exception being thrown with the TAO_OMG_VMCID constant/macro. + The minor code in use is one assigned by the OMG. + Sun Mar 18 12:34:44 2001 Carlos O'Ryan <coryan@uci.edu> * tao/Sequence.i: diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp index da9d2f99b15..256fb062662 100644 --- a/TAO/tao/Exception.cpp +++ b/TAO/tao/Exception.cpp @@ -467,7 +467,8 @@ CORBA_SystemException::_info (void) const const char *errno_indication; char unknown_errno [32]; - switch (this->minor () & 0x7FU) + CORBA::ULong minor_code = this->minor () & 0x7FU; + switch (minor_code) { case TAO_UNSPECIFIED_MINOR_CODE: errno_indication = "unspecified errno"; @@ -537,7 +538,7 @@ CORBA_SystemException::_info (void) const // 7 bits of some other errno. ACE_OS::sprintf (unknown_errno, "low 7 bits of errno: %3u", - this->minor () & 0x7FU); + minor_code); errno_indication = unknown_errno; } @@ -548,7 +549,7 @@ CORBA_SystemException::_info (void) const "TAO exception, " "minor code = %x (%s; %s), " "completed = %s\n", - this->minor (), + minor_code, location, errno_indication, (completed () == CORBA::COMPLETED_YES) ? "YES" : @@ -564,12 +565,17 @@ CORBA_SystemException::_info (void) const // over time. const char *minor_description = "*unknown description*"; + CORBA::ULong minor_code = this->minor () & 0xFFFU; + if (this->_is_a ("IDL:omg.org/CORBA/BAD_PARAM")) { - switch (this->minor () & 0xFFFU) + + switch (minor_code) { case TAO_OMG_MINOR_BAD_PARAM_10: - minor_description = "string_to_object conversion failed due to non specific reason"; + minor_description = + "string_to_object conversion failed due " + "to non specific reason"; break; default: break; @@ -580,10 +586,10 @@ CORBA_SystemException::_info (void) const char buffer[BUFSIZ]; ACE_OS::sprintf (buffer, - "This is an OMG minor code (%d), " + "OMG minor code (%d), " "described as '%s', " "completed = %s\n", - this->minor (), + minor_code, minor_description, (completed () == CORBA::COMPLETED_YES) ? "YES" : (completed () == CORBA::COMPLETED_NO) ? "NO" : @@ -599,7 +605,7 @@ CORBA_SystemException::_info (void) const "Unknown vendor minor code id (%x), " "minor code = %x, completed = %s\n", VMCID, - this->minor (), + this->minor (), // Use the raw minor code (completed () == CORBA::COMPLETED_YES) ? "YES" : (completed () == CORBA::COMPLETED_NO) ? "NO" : (completed () == CORBA::COMPLETED_MAYBE) ? "MAYBE" : diff --git a/TAO/tao/ORB_Core.i b/TAO/tao/ORB_Core.i index bb216a0c0cf..5f925f69b2d 100644 --- a/TAO/tao/ORB_Core.i +++ b/TAO/tao/ORB_Core.i @@ -457,7 +457,8 @@ TAO_ORB_Core::check_shutdown (CORBA_Environment &ACE_TRY_ENV) // CORBA::BAD_INV_ORDER exception with minor code 4 if the ORB // has shutdown by the time an ORB function is called. - ACE_THROW (CORBA::BAD_INV_ORDER (4, CORBA::COMPLETED_NO)); + ACE_THROW (CORBA::BAD_INV_ORDER (TAO_OMG_VMCID | 4, + CORBA::COMPLETED_NO)); } } |