Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CORBA_SystemException Class Reference

CORBA_SystemException. More...

#include <Exception.h>

Inheritance diagram for CORBA_SystemException:

Inheritance graph
[legend]
Collaboration diagram for CORBA_SystemException:

Collaboration graph
[legend]
List of all members.

Public Methods

 CORBA_SystemException (void)
 Default constructtor. More...

 CORBA_SystemException (const CORBA_SystemException &src)
 Copy constructor. More...

 ~CORBA_SystemException (void)
 Destructor. More...

CORBA_SystemException & operator= (const CORBA_SystemException &src)
 Assignment operator. More...

CORBA::ULong minor (void) const
 Get the minor status. More...

void minor (CORBA::ULong m)
 Set the minor status. More...

CORBA::CompletionStatus completed (void) const
 Get the completion status. More...

void completed (CORBA::CompletionStatus c)
 Set the operation completion status. More...

virtual int _is_a (const char *type_id) const
 Helper for the _downcast operation. More...

void _tao_print_system_exception (FILE *f=stdout) const
 Print the system exception <ex> to output determined by f. This function is not CORBA compliant. More...

virtual ACE_CString _info (void) const
 Returns a string containing information about the exception. This function is not CORBA compliant. More...

virtual void _tao_encode (TAO_OutputCDR &cdr ACE_ENV_ARG_DECL_NOT_USED) const
virtual void _tao_decode (TAO_InputCDR &cdr ACE_ENV_ARG_DECL_NOT_USED)

Static Public Methods

CORBA_SystemException * _downcast (CORBA_Exception *exception)
 Narrow to a SystemException. More...

CORBA::ULong _tao_minor_code (u_int location, int errno_value)
 Helper to create a minor status value. More...

CORBA::ULong _tao_errno (int errno_value)
 Helper to translate a platform-specific errno to a TAO errno value. More...


Protected Methods

 CORBA_SystemException (const char *repository_id, const char *local_name, CORBA::ULong code, CORBA::CompletionStatus completed)
 Constructor using a repository id. More...


Static Protected Methods

const char * _tao_get_omg_exception_description (const CORBA::SystemException &exc, CORBA::ULong minor_code)
 Return the exception description associated with the given OMG minor code. More...


Private Attributes

CORBA::ULong minor_
 Minor code. More...

CORBA::CompletionStatus completed_
 Completion status. More...


Detailed Description

CORBA_SystemException.

System exceptions are those defined in the CORBA spec; OMG-IDL defines these.

Definition at line 200 of file Exception.h.


Constructor & Destructor Documentation

TAO_NAMESPACE_END CORBA_SystemException::CORBA_SystemException void   
 

Default constructtor.

Definition at line 230 of file Exception.cpp.

00231 {
00232 }

CORBA_SystemException::CORBA_SystemException const CORBA_SystemException &    src
 

Copy constructor.

Definition at line 245 of file Exception.cpp.

00246   : CORBA_Exception (src),
00247     minor_ (src.minor_),
00248     completed_ (src.completed_)
00249 {
00250 }

CORBA_SystemException::~CORBA_SystemException void   
 

Destructor.

Definition at line 252 of file Exception.cpp.

00253 {
00254 }

CORBA_SystemException::CORBA_SystemException const char *    repository_id,
const char *    local_name,
CORBA::ULong    code,
CORBA::CompletionStatus    completed
[protected]
 

Constructor using a repository id.

Definition at line 234 of file Exception.cpp.

00238   : CORBA_Exception (repository_id,
00239                      local_name),
00240     minor_ (code),
00241     completed_ (completed)
00242 {
00243 }


Member Function Documentation

CORBA_SystemException * CORBA_SystemException::_downcast CORBA_Exception   exception [static]
 

Narrow to a SystemException.

Reimplemented from CORBA_Exception.

Definition at line 276 of file Exception.cpp.

References CORBA_Exception::_is_a.

00277 {
00278   if (exception->_is_a ("IDL:omg.org/CORBA/SystemException:1.0"))
00279     {
00280       return ACE_dynamic_cast (CORBA_SystemException *,
00281                                exception);
00282     }
00283 
00284   return 0;
00285 }

ACE_CString CORBA_SystemException::_info void    const [virtual]
 

Returns a string containing information about the exception. This function is not CORBA compliant.

Implements CORBA_Exception.

Definition at line 400 of file Exception.cpp.

References CORBA_Exception::_rep_id, ACE_CString, completed, minor, ACE_OS::sprintf, ACE_OS_String::strerror, TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE, TAO_AMH_REPLY_LOCATION_CODE, TAO_CONNECTOR_REGISTRY_NO_USABLE_PROTOCOL, TAO_DEFAULT_MINOR_CODE, TAO_EACCES_MINOR_CODE, TAO_EAFNOSUPPORT_MINOR_CODE, TAO_EAGAIN_MINOR_CODE, TAO_EBADF_MINOR_CODE, TAO_EBUSY_MINOR_CODE, TAO_ECOMM_MINOR_CODE, TAO_ECONNREFUSED_MINOR_CODE, TAO_ECONNRESET_MINOR_CODE, TAO_EEXIST_MINOR_CODE, TAO_EFAULT_MINOR_CODE, TAO_EINVAL_MINOR_CODE, TAO_EMFILE_MINOR_CODE, TAO_ENFILE_MINOR_CODE, TAO_ENOENT_MINOR_CODE, TAO_ENOMEM_MINOR_CODE, TAO_ENOSYS_MINOR_CODE, TAO_ENOTSUP_MINOR_CODE, TAO_EPERM_MINOR_CODE, TAO_EPIPE_MINOR_CODE, TAO_ETIMEDOUT_MINOR_CODE, TAO_GUARD_FAILURE, TAO_IMPLREPO_MINOR_CODE, TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE, TAO_INVOCATION_RECV_REQUEST_MINOR_CODE, TAO_INVOCATION_SEND_REQUEST_MINOR_CODE, TAO_MPROFILE_CREATION_ERROR, TAO_ORB_CORE_INIT_LOCATION_CODE, TAO_POA_BEING_DESTROYED, TAO_POA_DISCARDING, TAO_POA_HOLDING, TAO_POA_INACTIVE, TAO_POLICY_NARROW_CODE, TAO_RTCORBA_THREAD_CREATION_LOCATION_CODE, TAO_TIMEOUT_CONNECT_MINOR_CODE, TAO_TIMEOUT_RECV_MINOR_CODE, TAO_TIMEOUT_SEND_MINOR_CODE, TAO_UNHANDLED_SERVER_CXX_EXCEPTION, and TAO_UNSPECIFIED_MINOR_CODE.

00401 {
00402   // @@ there are a other few "user exceptions" in the CORBA scope,
00403   // they're not all standard/system exceptions ... really need to
00404   // either compare exhaustively against all those IDs (yeech) or
00405   // (preferably) to represent the exception type directly in the
00406   // exception value so it can be queried.
00407 
00408   ACE_CString info = "system exception, ID '";
00409   info += this->_rep_id ();
00410   info += "'\n";
00411 
00412   CORBA::ULong VMCID =
00413     this->minor () & 0xFFFFF000u;
00414 
00415   if (VMCID == TAO_DEFAULT_MINOR_CODE)
00416     {
00417       // @@ Move the following code to a subroutine, it is too long already!
00418       const char *location;
00419       switch (this->minor () & 0x00000F80u)
00420         {
00421         case TAO_INVOCATION_LOCATION_FORWARD_MINOR_CODE:
00422           location = "location forward failed";
00423           break;
00424         case TAO_INVOCATION_SEND_REQUEST_MINOR_CODE:
00425           location = "send request failed";
00426           break;
00427         case TAO_POA_DISCARDING:
00428           location = "poa in discarding state";
00429           break;
00430         case TAO_POA_HOLDING:
00431           location = "poa in holding state";
00432           break;
00433         case TAO_POA_INACTIVE:
00434           location = "poa in inactive state";
00435           break;
00436         case TAO_UNHANDLED_SERVER_CXX_EXCEPTION:
00437           location = "unhandled c++ exception in server side";
00438           break;
00439         case TAO_INVOCATION_RECV_REQUEST_MINOR_CODE:
00440           location = "failed to recv request response";
00441           break;
00442         case TAO_CONNECTOR_REGISTRY_NO_USABLE_PROTOCOL:
00443           location = "all protocols failed to parse the IOR";
00444           break;
00445         case TAO_MPROFILE_CREATION_ERROR:
00446           location = "error during MProfile creation";
00447           break;
00448         case TAO_TIMEOUT_CONNECT_MINOR_CODE:
00449           location = "timeout during connect";
00450           break;
00451         case TAO_TIMEOUT_SEND_MINOR_CODE:
00452           location = "timeout during send";
00453           break;
00454         case TAO_TIMEOUT_RECV_MINOR_CODE:
00455           location = "timeout during recv";
00456           break;
00457         case TAO_IMPLREPO_MINOR_CODE:
00458           location = "implrepo server exception";
00459           break;
00460         case TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE:
00461           location = "endpoint initialization failure in Acceptor Registry";
00462           break;
00463         case TAO_ORB_CORE_INIT_LOCATION_CODE:
00464           location = "ORB Core initialization failed";
00465           break;
00466         case TAO_POLICY_NARROW_CODE:
00467           location = "Failure when narrowing a Policy";
00468           break;
00469         case TAO_GUARD_FAILURE:
00470           location = "Failure when trying to acquire a guard/monitor";
00471           break;
00472         case TAO_POA_BEING_DESTROYED:
00473           location = "POA has been destroyed or is currently being destroyed";
00474           break;
00475         case TAO_AMH_REPLY_LOCATION_CODE:
00476           location = "Failure when trying to send AMH reply";
00477           break;
00478         case TAO_RTCORBA_THREAD_CREATION_LOCATION_CODE:
00479           location = "Failure in thread creation for RTCORBA thread pool";
00480           break;
00481         default:
00482           location = "unknown location";
00483         }
00484 
00485       const char *errno_indication;
00486       char unknown_errno [255];
00487       CORBA::ULong minor_code = this->minor () & 0x7FU;
00488       switch (minor_code)
00489         {
00490         case TAO_UNSPECIFIED_MINOR_CODE:
00491           errno_indication = "unspecified errno";
00492           break;
00493         case TAO_ETIMEDOUT_MINOR_CODE:
00494           errno_indication = "ETIMEOUT";
00495           break;
00496         case TAO_ENFILE_MINOR_CODE:
00497           errno_indication = "ENFILE";
00498           break;
00499         case TAO_EMFILE_MINOR_CODE:
00500           errno_indication = "EMFILE";
00501           break;
00502         case TAO_EPIPE_MINOR_CODE:
00503           errno_indication = "EPIPE";
00504           break;
00505         case TAO_ECONNREFUSED_MINOR_CODE:
00506           errno_indication = "ECONNREFUSED";
00507           break;
00508         case TAO_ENOENT_MINOR_CODE:
00509           errno_indication = "ENOENT";
00510           break;
00511         case TAO_EBADF_MINOR_CODE:
00512           errno_indication = "EBADF";
00513           break;
00514         case TAO_ENOSYS_MINOR_CODE:
00515           errno_indication = "ENOSYS";
00516           break;
00517         case TAO_EPERM_MINOR_CODE:
00518           errno_indication = "EPERM";
00519           break;
00520         case TAO_EAFNOSUPPORT_MINOR_CODE:
00521           errno_indication = "EAFNOSUPPORT";
00522           break;
00523         case TAO_EAGAIN_MINOR_CODE:
00524           errno_indication = "EAGAIN";
00525           break;
00526         case TAO_ENOMEM_MINOR_CODE:
00527           errno_indication = "ENOMEM";
00528           break;
00529         case TAO_EACCES_MINOR_CODE:
00530           errno_indication = "EACCES";
00531           break;
00532         case TAO_EFAULT_MINOR_CODE:
00533           errno_indication = "EFAULT";
00534           break;
00535         case TAO_EBUSY_MINOR_CODE:
00536           errno_indication = "EBUSY";
00537           break;
00538         case TAO_EEXIST_MINOR_CODE:
00539           errno_indication = "EEXIST";
00540           break;
00541         case TAO_EINVAL_MINOR_CODE:
00542           errno_indication = "EINVAL";
00543           break;
00544         case TAO_ECOMM_MINOR_CODE:
00545           errno_indication = "ECOMM";
00546           break;
00547         case TAO_ECONNRESET_MINOR_CODE:
00548           errno_indication = "ECONNRESET";
00549           break;
00550         case TAO_ENOTSUP_MINOR_CODE:
00551           errno_indication = "ENOTSUP";
00552           break;
00553         default:
00554           {
00555             // 7 bits of some other errno.
00556             ACE_OS::sprintf (unknown_errno,
00557                              "low 7 bits of errno: %3u %s",
00558                              minor_code, ACE_OS_String::strerror(minor_code));
00559 
00560             errno_indication = unknown_errno;
00561           }
00562         }
00563 
00564       char buffer[BUFSIZ];
00565       ACE_OS::sprintf (buffer,
00566                        "TAO exception, "
00567                        "minor code = %x (%s; %s), "
00568                        "completed = %s\n",
00569                        minor_code,
00570                        location,
00571                        errno_indication,
00572                        (completed () == CORBA::COMPLETED_YES) ? "YES" :
00573                        (completed () == CORBA::COMPLETED_NO) ? "NO" :
00574                        (completed () == CORBA::COMPLETED_MAYBE) ? "MAYBE" :
00575                        "garbage");
00576 
00577       info += buffer;
00578     }
00579   else if (VMCID == CORBA::OMGVMCID)
00580     {
00581       CORBA::ULong minor_code = this->minor () & 0xFFFU;
00582 
00583       const char *minor_description = 0;
00584 
00585       if (minor_code > 0)
00586           minor_description =
00587             CORBA::SystemException::_tao_get_omg_exception_description (
00588               *this,
00589               minor_code);
00590       else
00591         minor_description = "*unknown description*";
00592 
00593       char buffer[BUFSIZ];
00594       ACE_OS::sprintf (buffer,
00595                        "OMG minor code (%d), "
00596                        "described as '%s', "
00597                        "completed = %s\n",
00598                        minor_code,
00599                        minor_description,
00600                        (completed () == CORBA::COMPLETED_YES) ? "YES" :
00601                        (completed () == CORBA::COMPLETED_NO) ? "NO" :
00602                        (completed () == CORBA::COMPLETED_MAYBE) ? "MAYBE" :
00603                        "garbage");
00604 
00605       info += buffer;
00606     }
00607   else
00608     {
00609       char buffer[BUFSIZ];
00610       ACE_OS::sprintf (buffer,
00611                        "Unknown vendor minor code id (%x), "
00612                        "minor code = %x, completed = %s\n",
00613                        VMCID,
00614                        this->minor (),  // Use the raw minor code
00615                        (completed () == CORBA::COMPLETED_YES) ? "YES" :
00616                        (completed () == CORBA::COMPLETED_NO) ? "NO" :
00617                        (completed () == CORBA::COMPLETED_MAYBE) ? "MAYBE" :
00618                        "garbage");
00619 
00620       info += buffer;
00621     }
00622 
00623   return info;
00624 }

int CORBA_SystemException::_is_a const char *    type_id const [virtual]
 

Helper for the _downcast operation.

Reimplemented from CORBA_Exception.

Definition at line 268 of file Exception.cpp.

References CORBA_Exception::_is_a, and ACE_OS_String::strcmp.

00269 {
00270   return ACE_OS_String::strcmp (interface_id,
00271                                 "IDL:omg.org/CORBA/SystemException:1.0") == 0
00272     || CORBA_Exception::_is_a (interface_id);
00273 }

void CORBA_SystemException::_tao_decode TAO_InputCDR &cdr    ACE_ENV_ARG_DECL_NOT_USED [virtual]
 

Implements CORBA_Exception.

Definition at line 302 of file Exception.cpp.

References ACE_ENV_ARG_DECL, ACE_THROW, completed_, and CORBA::CompletionStatus.

00304 {
00305   // The string is read by the caller, to determine the exact type of
00306   // the exception.  We just decode the fields...
00307   // cdr.read_string (this->id ());
00308   CORBA::ULong tmp;
00309 
00310   if (cdr.read_ulong (this->minor_)
00311       && cdr.read_ulong (tmp))
00312     {
00313       this->completed_ = CORBA::CompletionStatus (tmp);
00314       return;
00315     }
00316 
00317   ACE_THROW (CORBA::MARSHAL ());
00318 }

void CORBA_SystemException::_tao_encode TAO_OutputCDR &cdr    ACE_ENV_ARG_DECL_NOT_USED const [virtual]
 

Implements CORBA_Exception.

Definition at line 288 of file Exception.cpp.

References ACE_ENV_ARG_DECL, and ACE_THROW.

00290 {
00291   if (cdr.write_string (this->_rep_id ())
00292       && cdr.write_ulong (this->minor ())
00293       && cdr.write_ulong (this->completed ()))
00294     {
00295       return;
00296     }
00297 
00298   ACE_THROW (CORBA::MARSHAL ());
00299 }

CORBA::ULong CORBA_SystemException::_tao_errno int    errno_value [static]
 

Helper to translate a platform-specific errno to a TAO errno value.

Definition at line 321 of file Exception.cpp.

References EAFNOSUPPORT, EBUSY, ECOMM, ECONNREFUSED, ECONNRESET, ENFILE, ENOSYS, ENOTSUP, ETIMEDOUT, TAO_EACCES_MINOR_CODE, TAO_EAFNOSUPPORT_MINOR_CODE, TAO_EAGAIN_MINOR_CODE, TAO_EBADF_MINOR_CODE, TAO_EBUSY_MINOR_CODE, TAO_ECOMM_MINOR_CODE, TAO_ECONNREFUSED_MINOR_CODE, TAO_ECONNRESET_MINOR_CODE, TAO_EEXIST_MINOR_CODE, TAO_EFAULT_MINOR_CODE, TAO_EINVAL_MINOR_CODE, TAO_EMFILE_MINOR_CODE, TAO_ENFILE_MINOR_CODE, TAO_ENOENT_MINOR_CODE, TAO_ENOMEM_MINOR_CODE, TAO_ENOSYS_MINOR_CODE, TAO_ENOTSUP_MINOR_CODE, TAO_EPERM_MINOR_CODE, TAO_EPIPE_MINOR_CODE, TAO_ETIMEDOUT_MINOR_CODE, and TAO_UNSPECIFIED_MINOR_CODE.

Referenced by _tao_minor_code.

00322 {
00323   switch (errno_value)
00324     {
00325     case 0:
00326       return TAO_UNSPECIFIED_MINOR_CODE;
00327     case ETIMEDOUT:
00328       return TAO_ETIMEDOUT_MINOR_CODE;
00329     case ENFILE:
00330       return TAO_ENFILE_MINOR_CODE;
00331     case EPIPE:
00332       return TAO_EPIPE_MINOR_CODE;
00333     case ECONNREFUSED:
00334       return TAO_ECONNREFUSED_MINOR_CODE;
00335     case ENOENT:
00336       return TAO_ENOENT_MINOR_CODE;
00337 
00338 #if !defined (ACE_HAS_WINCE)
00339     case EMFILE:
00340       return TAO_EMFILE_MINOR_CODE;
00341     case EBADF:
00342       return TAO_EBADF_MINOR_CODE;
00343     case EPERM:
00344       return TAO_EPERM_MINOR_CODE;
00345     case EINVAL:
00346       return TAO_EINVAL_MINOR_CODE;
00347 #endif  // ACE_HAS_WINCE
00348 
00349 #if (ENOSYS != EFAULT)
00350     case ENOSYS:
00351       return TAO_ENOSYS_MINOR_CODE;
00352 #endif /* ENOSYS != EFAULT */
00353     case EAFNOSUPPORT:
00354       return TAO_EAFNOSUPPORT_MINOR_CODE;
00355     case EAGAIN:
00356       return TAO_EAGAIN_MINOR_CODE;
00357     case ENOMEM:
00358       return TAO_ENOMEM_MINOR_CODE;
00359     case EACCES:
00360       return TAO_EACCES_MINOR_CODE;
00361     case EFAULT:
00362       return TAO_EFAULT_MINOR_CODE;
00363     case EBUSY:
00364       return TAO_EBUSY_MINOR_CODE;
00365     case EEXIST:
00366       return TAO_EEXIST_MINOR_CODE;
00367     case ECOMM:
00368       return TAO_ECOMM_MINOR_CODE;
00369     case ECONNRESET:
00370       return TAO_ECONNRESET_MINOR_CODE;
00371 #if (ENOTSUP != ENOSYS)
00372     case ENOTSUP:
00373       return TAO_ENOTSUP_MINOR_CODE;
00374 #endif /* ENOSYS != EFAULT */
00375     default:
00376       // Mask off bottom 7 bits and return them.
00377       return errno_value & 0x7FU;
00378     }
00379 }

const char * CORBA_SystemException::_tao_get_omg_exception_description const CORBA::SystemException   exc,
CORBA::ULong    minor_code
[static, protected]
 

Return the exception description associated with the given OMG minor code.

Definition at line 627 of file Exception.cpp.

00630 {
00631 #ifndef ACE_NDEBUG
00632 
00633   static const char *UNKNOWN_TABLE[] =
00634     {
00635       "Unlisted user exception received by client.",    // 1
00636       "Non-standard SystemException not supported.",    // 2
00637       "An unkown user exception received by a portable interceptor." // 3
00638     };
00639 
00640   static const char *BAD_PARAM_TABLE[] =
00641     {
00642       "Failure to register, unregister, or lookup value factory.", // 1
00643       "RID already defined in IFR.",                               // 2
00644       "Name already used in the context in IFR.",                  // 3
00645       "Target is not a valid container.",                          // 4
00646       "Name clash in inherited context.",                          // 5
00647       "Incorrect type for abstract interface.",                    // 6
00648       "string_to_object conversion failed due to a bad scheme name.", // 7
00649       "string_to_object conversion failed due to a bad address.",  // 8
00650       "string_to_object conversion failed due to a bad schema specific part.",// 9
00651       "string_to_object conversion failed due to non specific reason.", // 10
00652       "Attempt to derive abstract interface from non-abstract base interface in the Interface Repository.", // 11
00653       "Attempt to let a ValueDef support more than one non-abstract interface in the Interface Repository.", // 12
00654       "Attempt to use an incomplete TypeCode as a parameter.",     // 13
00655       "Invalid object id passed to POA::create_reference_by_id.",  // 14
00656       "Bad name argument in TypeCode operation.",                  // 15
00657       "Bad RepositoryId argument in TypeCode operation.",          // 16
00658       "Invalid member namein TypeCode operation.",                 // 17
00659       "Duplicate label value in create_union_tc.",                 // 18
00660       "Incompatible TypeCode of label and discriminator in create_union_tc.", // 19
00661       "Supplied discriminator type illegitimate in create_union_tc.", // 20
00662       "Any passed to ServerRequest::set_exception does not contain an exception.", // 21
00663       "Unlisted user exception passed to ServerRequest::set_exception", // 22
00664       "wchar transmission code set not in service context.",       // 23
00665       "Service context is not in OMG-defined range.",              // 24
00666       "Enum value out of range.",                                  // 25
00667       "Invalid service context Id in portable interceptor.",       // 26
00668       "Attempt to call register_initial_reference with a null Object.", // 27
00669       "Invalid component Id in portable interceptor.",             // 28
00670       "Invalid profile Id in portable interceptor.",               // 29
00671       "Two or more Policy objects with the same PolicyType value supplied to Object::set_policy_overrides or PolicyManager::set_policy_overrides." // 30
00672       "Attempt to define a oneway operation with non-void result, out or inout parameters or user exceptions.", // 31
00673       "DII asked to create request for an implicit operation.",     // 32,
00674       "An OTS/XA integration xa_ call returned XAER_INVAL.",        // 33
00675       "Union branch modifier called with bad case label discriminator.", // 34
00676       "Illegal IDL context property name.",   // 35
00677       "Illegal IDL property search string.",  // 36
00678       "Illegal IDL context name.",            // 37
00679       "Non-empty IDL context.",               // 38
00680       "Servant not found [ServantManager].",  // 39
00681       "ORB output stream does not support ValueOutputStream interface.", // 40
00682       "ORB input stream does not support ValueInputStream interface."    // 41
00683     };
00684 
00685   static const char *IMP_LIMIT_TABLE[] =
00686     {
00687       "Unable to use any profile in IOR." // 1
00688     };
00689 
00690   static const char *INITIALIZE_TABLE[] =
00691     {
00692       "Priority range too restricted for ORB." // 1
00693     };
00694 
00695 
00696   static const char *INV_OBJREF_TABLE[] =
00697     {
00698       "wchar Code Set support not specified.", // 1
00699       "Codeset component required for type using wchar or wstring data." // 2
00700     };
00701 
00702   static const char *MARSHAL_TABLE[] =
00703     {
00704       "Unable to locate value factory.",  // 1
00705       "ServerRequest::set_result called before ServerRequest::ctx when the operation IDL contains a context clause.", // 2
00706       "NVList passed to ServerRequest::arguments does not describe all parameters passed by client.", // 3
00707       "Attempt to marshal Local object.", // 4
00708       "wchar or wstring data erroneously sent by client over GIOP 1.0 connection.", // 5
00709       "wchar or wstring data erroneously returned by server over GIOP 1.0 connection." //6
00710       "Unsupported RMI/IDL custom value type stream format." // 7
00711     };
00712 
00713   static const char *BAD_TYPECODE_TABLE[] =
00714     {
00715       "Attempt to marshal incomplete TypeCode.",              // 1
00716       "Member type code illegitimate in TypeCode operation.", // 2
00717       "Illegal parameter type."                               // 3
00718     };
00719 
00720   static const char *NO_IMPLEMENT_TABLE[] =
00721     {
00722       "Missing local value implementation.",        // 1
00723       "Incompatible value implementation version.", // 2
00724       "Unable to use any profile in IOR.",          // 3
00725       "Attempt to use DII on Local object.",        // 4
00726       "Biomolecular Sequence Analysis iterator cannot be reset.",         // 5
00727       "Biomolecular Sequence Analysis metadata is not available as XML.", // 6
00728       "Genomic Maps iterator cannot be rest."       // 7
00729     };
00730 
00731   static const char *NO_RESOURCE_TABLE[] =
00732     {
00733       "Portable Interceptor operation not support in this binding.", // 1
00734       "No connection for request's priority."                        // 2
00735     };
00736 
00737   static const char *BAD_INV_ORDER_TABLE[] =
00738     {
00739       "Dependency exists in IFR preventing destruction of this object", // 1
00740       "Attempt to destroy indestructible objects in IFR.", // 2
00741       "Operation would deadlock.",                         // 3
00742       "ORB has shutdown.",                                 // 4
00743       "Attempt to invoke \"send\" or \"invoke\" operation of the same \"Request\" object more than once.", // 5
00744       "Attempt to set a servant manager after one has already been set.", // 6
00745       "ServerRequest::arguments called more than once or after a call to ServerRequest::set_exception.", // 7
00746       "ServerRequest::ctx called more than once or before ServerRequest::arguments or after ServerRequest::ctx, ServerRequest::set_result or ServerRequest::set_exception.", // 8
00747       "ServerRequest::result called more than once or before ServerRequest::arguments or after ServerRequest::set_result or ServerRequest::set_exception.", // 9
00748       "Attempt to send a DII request after it was sent previously.", // 10
00749       "Attempt to poll a DII request or to retrieve its result before the request was sent.", // 11
00750       "Attempt to poll a DII request or to retrieve its result after the result was retrieved previously.", // 12
00751       "Attempt to poll a synchronous DII request or to retrieve results from a synchronous DII request.", // 13
00752       "Invalid portable interceptor call",                 // 14
00753       "Service context add failed in portable interceptor because a service context with the given id already exists.", // 15
00754       "Registration of PolicyFactory failed because a factory already exists for the given type.", // 16
00755       "POA cannot create POAs while undergoing destruction." // 17
00756     };
00757 
00758   static const char *TRANSIENT_TABLE[] =
00759     {
00760       "Request discarded due to resource exhaustion in POA, or because POA is in discarding state.", // 1
00761       "No usable profile in IOR.",                            // 2
00762       "Request cancelled.",                                   // 3
00763       "POA destroyed."                                        // 4
00764     };
00765 
00766   static const char *OBJ_ADAPTER_TABLE[] =
00767     {
00768       "System exception in POA::unknown_adapter.",              // 1
00769       "Incorrect servant type returned by servant manager",     // 2
00770       "No default servant available [POA policy].",             // 3
00771       "No servant manager available [POA policy].",             // 4
00772       "Violation of POA policy by ServantActivator::incarnate.",// 5
00773       "Exception in PortableInterceptor::IORInterceptor::components_established.", // 6
00774       "Null servant returned by servant manager."               // 7
00775     };
00776 
00777   static const char *DATA_CONVERSION_TABLE[] =
00778     {
00779       "Character does not map to negotiated transmission code set.", // 1
00780       "Failure of PriorityMapping object."                           // 2
00781     };
00782 
00783   static const char *OBJECT_NOT_EXIST_TABLE[] =
00784     {
00785       "Attempt to pass an unactivated (unregistered) value as an object reference.", // 1
00786       "POAManager::incarnate failed to create POA." // 2
00787     };
00788 
00789   static const char *INV_POLICY_TABLE[] =
00790     {
00791       "Unable to reconcile IOR specified policy with the effective policy override." // 1
00792       "Invalid PolicyType.", // 2
00793       "No PolicyFactory has been registered for the given PolicyType." // 3
00794     };
00795 
00796   if (minor_code == 0)
00797     return "*unknown description*";
00798 
00799   minor_code--;  // Adjust to match table offset.
00800 
00801   if (exc._is_a ("IDL:omg.org/CORBA/UNKNOWN:1.0")
00802       && minor_code < sizeof UNKNOWN_TABLE / sizeof (char *))
00803     return UNKNOWN_TABLE[minor_code];
00804 
00805   if (exc._is_a ("IDL:omg.org/CORBA/BAD_PARAM:1.0")
00806       && minor_code < sizeof BAD_PARAM_TABLE / sizeof (char *))
00807     return BAD_PARAM_TABLE[minor_code];
00808 
00809   if (exc._is_a ("IDL:omg.org/CORBA/IMP_LIMIT:1.0")
00810       && minor_code < sizeof IMP_LIMIT_TABLE / sizeof (char *))
00811     return IMP_LIMIT_TABLE[minor_code];
00812 
00813   if (exc._is_a ("IDL:omg.org/CORBA/INITIALIZE:1.0")
00814       && minor_code < sizeof INITIALIZE_TABLE / sizeof (char *))
00815     return INITIALIZE_TABLE[minor_code];
00816 
00817   if (exc._is_a ("IDL:omg.org/CORBA/INV_OBJREF:1.0")
00818       && minor_code < sizeof INV_OBJREF_TABLE / sizeof (char *))
00819     return INV_OBJREF_TABLE[minor_code];
00820 
00821   if (exc._is_a ("IDL:omg.org/CORBA/MARSHAL:1.0")
00822       && minor_code < sizeof MARSHAL_TABLE / sizeof (char *))
00823     return MARSHAL_TABLE[minor_code];
00824 
00825   if (exc._is_a ("IDL:omg.org/CORBA/BAD_TYPECODE:1.0")
00826       && minor_code < sizeof BAD_TYPECODE_TABLE / sizeof (char *))
00827     return BAD_TYPECODE_TABLE[minor_code];
00828 
00829   if (exc._is_a ("IDL:omg.org/CORBA/NO_IMPLEMENT:1.0")
00830       && minor_code < sizeof NO_IMPLEMENT_TABLE / sizeof (char *))
00831     return NO_IMPLEMENT_TABLE[minor_code];
00832 
00833   if (exc._is_a ("IDL:omg.org/CORBA/NO_RESOURCE:1.0")
00834       && minor_code < sizeof NO_RESOURCE_TABLE / sizeof (char *))
00835     return NO_RESOURCE_TABLE[minor_code];
00836 
00837   if (exc._is_a ("IDL:omg.org/CORBA/BAD_INV_ORDER:1.0")
00838       && minor_code < sizeof BAD_INV_ORDER_TABLE / sizeof (char *))
00839     return BAD_INV_ORDER_TABLE[minor_code];
00840 
00841   if (exc._is_a ("IDL:omg.org/CORBA/TRANSIENT:1.0")
00842       && minor_code < sizeof TRANSIENT_TABLE / sizeof (char *))
00843     return TRANSIENT_TABLE[minor_code];
00844 
00845   if (exc._is_a ("IDL:omg.org/CORBA/OBJ_ADAPTER:1.0")
00846       && minor_code < sizeof OBJ_ADAPTER_TABLE / sizeof (char *))
00847     return OBJ_ADAPTER_TABLE[minor_code];
00848 
00849   if (exc._is_a ("IDL:omg.org/CORBA/DATA_CONVERSION:1.0")
00850       && minor_code < sizeof DATA_CONVERSION_TABLE / sizeof (char *))
00851     return DATA_CONVERSION_TABLE[minor_code];
00852 
00853   if (exc._is_a ("IDL:omg.org/CORBA/OBJECT_NOT_EXIST:1.0")
00854       && minor_code < sizeof OBJECT_NOT_EXIST_TABLE / sizeof (char *))
00855     return OBJECT_NOT_EXIST_TABLE[minor_code];
00856 
00857   if (exc._is_a ("IDL:omg.org/CORBA/INV_POLICY:1.0")
00858       && minor_code < sizeof INV_POLICY_TABLE / sizeof (char *))
00859     return INV_POLICY_TABLE[minor_code];
00860 
00861 #else
00862   ACE_UNUSED_ARG (exc);
00863   ACE_UNUSED_ARG (minor_code);
00864 #endif  /* !ACE_NDEBUG */
00865 
00866   return "*unknown description*";
00867 }

CORBA::ULong CORBA_SystemException::_tao_minor_code u_int    location,
int    errno_value
[static]
 

Helper to create a minor status value.

Definition at line 382 of file Exception.cpp.

References _tao_errno, and TAO_DEFAULT_MINOR_CODE.

Referenced by TAO_Remote_Object_Proxy_Impl::_get_component, TAO_Remote_Object_Proxy_Impl::_is_a, TAO_Remote_Object_Proxy_Impl::_non_existent, CORBA_Object::_set_policy_overrides, TAO_ORBInitInfo::add_client_request_interceptor, TAO_Interceptor_List::add_interceptor_i, TAO_ORBInitInfo::add_server_request_interceptor, TAO_ORBInitInfo::allocate_slot_id, TAO_ORBInitInfo::allocate_tss_slot_id, TAO_ORBInitInfo::arguments, TAO_CodecFactory::create_codec, CORBA_ORB::create_list, TAO_CDR_Encaps_Codec::decode, TAO_CDR_Encaps_Codec::decode_value, TAO_CDR_Encaps_Codec::encode, TAO_CDR_Encaps_Codec::encode_value, TAO_Default_Endpoint_Selector::forward, CORBA_ORB::get_service_information, TAO_PICurrent_Impl::get_slot, CORBA_ORB::init_orb_globals, TAO_GIOP_Invocation::invoke, TAO_Connector::make_mprofile, TAO_Connector_Registry::make_mprofile, CORBA_ORB::object_to_string, TAO_DLL_Parser::parse_string, TAO_CORBALOC_Parser::parse_string_mprofile_helper, TAO_GIOP_Invocation::perform_call, CORBA_ORB::poll_next_response, TAO_ORBInitializer_Registry::register_orb_initializer, TAO_PolicyFactory_Registry::register_policy_factory, TAO_ORB_Core::service_raise_comm_failure, TAO_ORB_Core::service_raise_transient_failure, TAO_GIOP_Invocation::start, CORBA_ORB::string_to_object, TAO_Profile::verify_orb_configuration, and TAO_Profile::verify_profile_version.

00384 {
00385   return
00386     TAO_DEFAULT_MINOR_CODE
00387     | location
00388     | _tao_errno (errno_value);
00389 }

void CORBA_SystemException::_tao_print_system_exception FILE *    f = stdout const
 

Print the system exception <ex> to output determined by f. This function is not CORBA compliant.

Definition at line 392 of file Exception.cpp.

References ACE_DEBUG, ACE_LIB_TEXT, ACE_TEXT_CHAR_TO_TCHAR, and LM_ERROR.

00393 {
00394   ACE_DEBUG ((LM_ERROR,
00395               ACE_LIB_TEXT("(%P|%t) system exception, ID '%s'\n"),
00396               ACE_TEXT_CHAR_TO_TCHAR(this->_info ().c_str ())));
00397 }

ACE_INLINE void CORBA_SystemException::completed CORBA::CompletionStatus    c
 

Set the operation completion status.

Definition at line 35 of file Exception.i.

References completed_.

00036 {
00037   this->completed_ = c;
00038 }

ACE_INLINE CORBA::CompletionStatus CORBA_SystemException::completed void    const
 

Get the completion status.

Definition at line 29 of file Exception.i.

References completed_.

Referenced by _info.

00030 {
00031   return this->completed_;
00032 }

ACE_INLINE void CORBA_SystemException::minor CORBA::ULong    m
 

Set the minor status.

Definition at line 23 of file Exception.i.

References minor_.

00024 {
00025   this->minor_ = m;
00026 }

ACE_INLINE CORBA::ULong CORBA_SystemException::minor void    const
 

Get the minor status.

Definition at line 17 of file Exception.i.

References minor_.

Referenced by _info.

00018 {
00019   return this->minor_;
00020 }

CORBA_SystemException & CORBA_SystemException::operator= const CORBA_SystemException &    src
 

Assignment operator.

Definition at line 257 of file Exception.cpp.

References completed_, minor_, and CORBA_Exception::operator=.

00258 {
00259   this->CORBA_Exception::operator= (src);
00260 
00261   this->minor_ = src.minor_;
00262   this->completed_ = src.completed_;
00263 
00264   return *this;
00265 }


Member Data Documentation

CORBA::CompletionStatus CORBA_SystemException::completed_ [private]
 

Completion status.

Definition at line 278 of file Exception.h.

Referenced by _tao_decode, completed, and operator=.

CORBA::ULong CORBA_SystemException::minor_ [private]
 

Minor code.

Definition at line 275 of file Exception.h.

Referenced by minor, and operator=.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:01:56 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002