Visit Platform at http://www.platform.com

Main Page   Class Hierarchy   Compound List   Compound Members  

SoamException Class Reference

Base class of exceptions generated by the system, accessible to both client applications and services. More...

Inheritance diagram for SoamException:

FailureException FatalException List of all members.

Public Methods

 SoamException (void) throw ()
 Creates an exception with no error message.

virtual const char * what () const throw ()
 Return the error message.

virtual SOAM_HRESULT getHR () const throw ()
 Return the error code.

virtual int getErrorCode (void) const throw ()
 Returns the system error code for this exception.

virtual const char * getErrorType (void) const throw ()
 Indicates the type of the exception. This will return the type by name for example "FailureException".

SoamException * getEmbeddedException (void) const throw ()
 Returns a pointer to the embedded exception object.

SoamException & operator= (const SoamException &rhs)
 The assignment operator.


Friends

class ServiceContainer
class Message

Detailed Description

Base class of exceptions generated by the system, accessible to both client applications and services.

Some exceptions are generated by the system itself, while others are generated by the service and propagated back to the client application.

If a pointer to a SoamException object is thrown within the service, the memory it is pointing to will be freed automatically using the delete operator.

If your exception must be created on the heap then it is recommended that a smart pointer be thrown instead of a raw pointer to prevent any ambiguity.

eg.

SoamExceptionPtr ex = new SoamException();
...
throw ex;


NOTE :

See also:
SoamExceptionPtr


Constructor & Destructor Documentation

SoamException void    throw ()
 

Creates an exception with no error message.


Member Function Documentation

virtual const char* what   const throw () [virtual]
 

Return the error message.

Returns:
a string containing the error message.

virtual SOAM_HRESULT getHR   const throw () [virtual]
 

Return the error code.

Returns:
the error code.

virtual int getErrorCode void    const throw () [virtual]
 

Returns the system error code for this exception.

virtual const char* getErrorType void    const throw () [virtual]
 

Indicates the type of the exception. This will return the type by name for example "FailureException".

SoamException* getEmbeddedException void    const throw ()
 

Returns a pointer to the embedded exception object.

When an exception is thrown from the service, the middleware will embed the service exception within a SoamException to provide context.
This method will retrieve the embedded exception thrown in the service. If no exception is embedded it will return 0 (i.e. NULL).

The caller of this method will own the embedded exception and must delete it after use. For simplicity, it is recommended that you retrieve the embedded exception using a smart pointer so that you do not need to worry about cleaning up the embedded exception object.

SoamExceptionPtr embeddedEx = ex.getEmbeddedException();


Returns:
a pointer to an embedded exception object, if present.
Exceptions:
SoamException 

SoamException& operator= const SoamException &    rhs
 

The assignment operator.

This method will safely assign the exception being passed to the current exception.

Returns:
a reference to the current object.


     
Date Modified: 3 Nov 2008
Platform Support: support@platform.com
Platform Information Development: doc@platform.com

Platform Computing. Accelerating Intelligence(TM).
Copyright © 2001-2008 Platform Computing Corporation. All rights reserved.