diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-21 07:28:45 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-21 07:28:45 +0000 |
commit | 3bcfa7354450890a494736d7df71f2fc938fd0bc (patch) | |
tree | fa2bdd69f3684840dfe34db77710590cfa1dc56f /TAO/tao/Environment.cpp | |
parent | 6c05926380d2b3df287bf2142a6c7fdd6812a4bf (diff) | |
download | ATCD-3bcfa7354450890a494736d7df71f2fc938fd0bc.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao/Environment.cpp')
-rw-r--r-- | TAO/tao/Environment.cpp | 70 |
1 files changed, 38 insertions, 32 deletions
diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp index 8a4090584f2..43f60951209 100644 --- a/TAO/tao/Environment.cpp +++ b/TAO/tao/Environment.cpp @@ -144,40 +144,46 @@ void CORBA::Environment::print_exception (const char *info, FILE *) const { - const char *id = this->exception_->_id (); - - ACE_DEBUG ((LM_ERROR, "(%P|%t) EXCEPTION, %s\n", info)); - - // @@ get rid of this logic, and rely on some member function on - // Exception to say if it's user or system exception. - - if (this->exception_type () == CORBA::SYSTEM_EXCEPTION) + if (this->exception_) { - CORBA::SystemException *x2 = - CORBA_SystemException::_narrow (this->exception_); - - // @@ there are a other few "user exceptions" in the CORBA - // scope, they're not all standard/system exceptions ... really - // need to either compare exhaustively against all those IDs - // (yeech) or (preferably) to represent the exception type - // directly in the exception value so it can be queried. - - ACE_DEBUG ((LM_ERROR, - "(%P|%t) system exception, ID '%s'\n", - id)); - ACE_DEBUG ((LM_ERROR, - "(%P|%t) minor code = %x, completed = %s\n", - x2->minor (), - (x2->completion () == CORBA::COMPLETED_YES) ? "YES" : - (x2->completion () == CORBA::COMPLETED_NO) ? "NO" : - (x2->completion () == CORBA::COMPLETED_MAYBE) ? "MAYBE" : - "garbage")); + const char *id = this->exception_->_id (); + + ACE_DEBUG ((LM_ERROR, "(%P|%t) EXCEPTION, %s\n", info)); + + // @@ get rid of this logic, and rely on some member function on + // Exception to say if it's user or system exception. + + if (this->exception_type () == CORBA::SYSTEM_EXCEPTION) + { + CORBA::SystemException *x2 = + CORBA_SystemException::_narrow (this->exception_); + + // @@ there are a other few "user exceptions" in the CORBA + // scope, they're not all standard/system exceptions ... really + // need to either compare exhaustively against all those IDs + // (yeech) or (preferably) to represent the exception type + // directly in the exception value so it can be queried. + + ACE_DEBUG ((LM_ERROR, + "(%P|%t) system exception, ID '%s'\n", + id)); + ACE_DEBUG ((LM_ERROR, + "(%P|%t) minor code = %x, completed = %s\n", + x2->minor (), + (x2->completion () == CORBA::COMPLETED_YES) ? "YES" : + (x2->completion () == CORBA::COMPLETED_NO) ? "NO" : + (x2->completion () == CORBA::COMPLETED_MAYBE) ? "MAYBE" : + "garbage")); + } + else + // @@ we can use the exception's typecode to dump all the data + // held within it ... + + ACE_DEBUG ((LM_ERROR, + "(%P|%t) user exception, ID '%s'\n", + id)); } else - // @@ we can use the exception's typecode to dump all the data - // held within it ... - ACE_DEBUG ((LM_ERROR, - "(%P|%t) user exception, ID '%s'\n", - id)); + "(%P|%t) no exception\n")); } |