ALMA Computing Group
Public Member Functions | Private Attributes

ClientErrorComponent Class Reference
[Client Examples]

This class demonstrates error handling when accessing a (remote) component. More...

List of all members.

Public Member Functions

 ClientErrorComponent (SimpleClient &client, char *errorComponent)
virtual ~ClientErrorComponent ()
void TestOk ()
 Here everything should go fine.
void TestReceiveRemoteException ()
 Example 1: Calls a method that throws an exception with an error trace.
void TestReceiveRemoteCompletion ()
 Example 2: Calls a method that returns a completion If the completion contains an error, then.
void testExceptionFromCompletion ()
 Example 3: Calls a method that throws an exception with an error trace.
void testTypeException ()
 Example 4: Calls a method that throws an exception with an error trace.
void TestReceiveCorbaSystemException ()
 Example 5: Calls a method that throws a CORBA system exception It:
void testCompletionFromCompletion ()
 Example 6: Calls a method that returns a completion If the completion contains an error, then.
void testCompletionOnStack ()
 Example 6: Calls a method that returns a completion created on the stack instead of heap If the completion contains an error, then.
void testOutCompletion ()
 Example 7: Calls a method that returns a completion as an "out" parameter.

Private Attributes

SimpleClient & client_m
std::string errorComponent_m
acsexmplErrorComponent::ErrorComponent_var foo_m

Detailed Description

This class demonstrates error handling when accessing a (remote) component.

When the class is instantiated, it gets a reference to the ErrorComponent counterpart throw the manager services provided by the SimpleClient. When the destructor is called, the reference to the component is released. This strategy ensures a clean handling of references to Components.

Each of the public methods of the class demonstrates some error handling pattern. Each method is self-contained and it should never throw exceptions in itself, but for ACSErrTypeCommon::CouldntAccessComponentEx, to be used when the reference to the component is not properly initialised. Other errors are always completely handled internally.

Definition at line 124 of file acsexmplClientErrorComponent.cpp.


Member Data Documentation

SimpleClient& ClientErrorComponent::client_m [private]
acsexmplErrorComponent::ErrorComponent_var ClientErrorComponent::foo_m [private]

The documentation for this class was generated from the following file: