Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
List of all members | Public Member Functions
IlsException Class Reference

This class is the base class for all exceptions thrown in the Server library. More...

#include <ilserver/except.h>

Inheritance diagram for IlsException:
IlsModelException IlsMTException IlsMvComponentException IlsOnExitException IlsStringException IlsUtilityException IlsAlreadyInDictionary IlsAlreadyInserted IlsAlreadyInSet IlsCycle IlsMaxCardViolated IlsMinCardViolated IlsNullPointerEncountered IlsOwnershipCycle IlsSizeViolation IlsUnownedUse IlsUpdateForbidden IlsConditionException IlsMutexException IlsRWLockException IlsThreadException IlsInvalidCollector IlsInvalidStringException IlsAddingToOpenTable IlsAlreadyInTable IlsBeginningOfList IlsClearingOpenTable IlsEndOfList IlsForbiddenOnEmptyList IlsNotFound IlsNullPointerDereferencing IlsRemovingFromOpenTable

Public Member Functions

 IlsException (char *message=0, IlsBoolean destroyMessage=IlsFalse)
 This constructor creates an instance of IlsException. More...
 
 IlsException (const char *message)
 This constructor creates an instance of IlsException. The message parameter will not be deleted or copied. More...
 
 IlsException (const IlsException &rhs)
 This copy constructor copies an instance of a message. More...
 
virtual ~IlsException ()
 This virtual destructor will delete the message it contains if the exception was created with the destroyMessage parameter set to IlsTrue.
 
const char * getMessage () const
 This member function returns the message, if any, contained in the exception. More...
 
IlsBoolean operator== (const IlsException &rhs) const
 This copy operator copies the exception rhs. More...
 
void setMessage (const char *message)
 This member function changes the message in an exception. More...
 

Detailed Description

This class is the base class for all exceptions thrown in the Server library.

Library: server
and mvcomp

All exceptions that are thrown derive from this class (without adding any new methods) so that it is possible to catch a particular exception using the standard C++ mechanism.

Constructor & Destructor Documentation

◆ IlsException() [1/3]

IlsException::IlsException ( char *  message = 0,
IlsBoolean  destroyMessage = IlsFalse 
)

This constructor creates an instance of IlsException.

If a message is passed in as the first parameter, it can be used via the getMessage member function in the catch statement to print out a message. If the parameter destroyMessage is set to IlsTrue, the message will be deleted (via delete []) when the exception is deleted.

◆ IlsException() [2/3]

IlsException::IlsException ( const char *  message)

This constructor creates an instance of IlsException. The message parameter will not be deleted or copied.

The message can be used via the getMessage() member function in the catch statement to print out a message.

◆ IlsException() [3/3]

IlsException::IlsException ( const IlsException rhs)

This copy constructor copies an instance of a message.

If the message in rhs is marked to be destroyed on deletion of rhs, the message is copied into the new instance.

Member Function Documentation

◆ getMessage()

const char* IlsException::getMessage ( ) const

This member function returns the message, if any, contained in the exception.

This can be used to print an error message, potentially containing extra information, when the exception is caught. An example of this is shown below:

try {
run();
}
catch (IlsOwnershipCycle exc) { // an ownership cycle
}
catch (IlsException exc) { // some other Rogue Wave Server exception
}
catch (...) { // a non Rogue Wave Server exception
}

◆ operator==()

IlsBoolean IlsException::operator== ( const IlsException rhs) const

This copy operator copies the exception rhs.

If the message in rhs is marked to be destroyed on deletion of rhs, then the message is copied into the new instance.

◆ setMessage()

void IlsException::setMessage ( const char *  message)

This member function changes the message in an exception.

If the old message is marked as deletable, then it is deleted and the new message is copied. The message is always copied when this member function is called.

IlsException
This class is the base class for all exceptions thrown in the Server library.
Definition: except.h:57
IlsOwnershipCycle
Thrown when there is an attempt to create cycles in ownership relations and integrity check is on.
Definition: sexcept.h:113