13.1.11.4 Member Functions
For a given OMG IDL exception
TYPE
, the
generated member functions are as follows:
-
static TYPE * _narrow(CORBA::Exception_ptr Except);
- This function returns a pointer to a
TYPE
exception class if the exception can be narrowed to aTYPE
exception. If the exception cannot be narrowed, 0 (zero) is returned. TheTYPE
pointer is not a pointer to a new class. Instead, it is a typed pointer to the original exception pointer and is valid only as long as the Except parameter is valid. -
TYPE( );
- This is the default constructor for the exception. No initialization of members is performed for fixed-length members. Variable-length members map to self-managing types; these types have constructors that initialize the member.
-
TYPE(member-parameters);
- This constructor has an argument for each of the members in the exception. The constructor copies each argument and does not assume ownership of the memory for any argument. Building on the previous example, the signature of the constructor is:
-
NonExist (ID _BadId);
- There is one argument for each member of the exception. The type and parameter-passing mechanism are identical to the Any insertion operator. For information about the Any insertion operator, see the section Insertion into Any.
-
TYPE(const TYPE &From);
- This copy constructor copies the data from the specified
TYPE
exception argument. TheFrom
argument specifies the exception to be copied. -
~TYPE ();
- This destructor frees the data associated with the exception.
-
TYPE &operator=(const TYPE &From);
- This assignment operator copies the data from the specified
TYPE
exception argument. TheFrom
argument specifies the exception to be copied. -
void _raise ();
- This function causes the exception instance to throw itself. A catch clause
Parent topic: Exceptions