Public Member Functions

acsexmplErrorComponent::ErrorComponent Interface Reference

import "acsexmplErrorComponent.idl";

Inheritance diagram for acsexmplErrorComponent::ErrorComponent:
Inheritance graph
[legend]
Collaboration diagram for acsexmplErrorComponent::ErrorComponent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void displayMessage ()
void badMethod (in short depth) raises (ACSErrTypeCommon::GenericErrorEx, ACSErrTypeCommon::UnexpectedExceptionEx)
void exceptionFromCompletion (in short depth) raises (ACSErrTypeCommon::GenericErrorEx)
void typeException (in short depth) raises (ACSErrTypeCommon::GenericErrorEx, ACSErrTypeCommon::ACSErrTypeCommonEx)
void corbaSystemException ()
ACSErr::Completion completionFromException (in short depth)
ACSErr::Completion completionFromCompletion (in short depth)
ACSErr::Completion completionOnStack (in short depth)
void outCompletion (out ACSErr::Completion comp)
void generateSIGFPE (in short way)
void generateSIGSEGV (in short way)
void sleepingCmd (in short nb_seconds)

Detailed Description

Interface ErrorComponent is used to demonstrate examples of the ACS error system. The methods are thought to produce errors and completions of various types. Implementation and clients demonstrate how to deal with them.


Member Function Documentation

void acsexmplErrorComponent::ErrorComponent::badMethod ( in short  depth  )  raises (ACSErrTypeCommon::GenericErrorEx, ACSErrTypeCommon::UnexpectedExceptionEx)

Simple method that throws an ACSException with an error trace of a given depth.

Parameters:
depth depth of the error trace (will be interpreted as 1 if it is < 1). In Java this corresponds to the total number of exception and causing exceptions.
Returns:
void

ACSErr::Completion acsexmplErrorComponent::ErrorComponent::completionFromCompletion ( in short  depth  ) 

Simple method that returns an ACSErr::Completion. The Error Trace in the completion is added from a completion.

Parameters:
depth depth of the error trace, if <= 0, returns OK completion
Returns:
ACSErr::Completion

ACSErr::Completion acsexmplErrorComponent::ErrorComponent::completionFromException ( in short  depth  ) 

Simple method that returns an ACSErr::Completion. The Error Trace in the completion is added from an exception.

Parameters:
depth depth of the error trace, if <= 0, returns OK completion
Returns:
ACSErr::Completion

ACSErr::Completion acsexmplErrorComponent::ErrorComponent::completionOnStack ( in short  depth  ) 

Simple method that returns an ACSErr::Completion. Completion is located on the stack instead on the heap.

Parameters:
depth depth of the error trace, if <= 0, returns OK completion
Returns:
ACSErr::Completion

void acsexmplErrorComponent::ErrorComponent::corbaSystemException (  ) 

Method that throws a CORBA::BAD_PARAM system exception to show how to handle CORBA System Exceptions

void acsexmplErrorComponent::ErrorComponent::displayMessage (  ) 

Prints "ErrorComponent" to the console (where the container that activated this component is running).

Returns:
void

void acsexmplErrorComponent::ErrorComponent::exceptionFromCompletion ( in short  depth  )  raises (ACSErrTypeCommon::GenericErrorEx)

Method that throws an ACSException (ACSErrTypeCommon::GenericErrorEx). The error trace inside the exception is added from a completion.

Parameters:
depth depth of the error trace
Returns:
void

void acsexmplErrorComponent::ErrorComponent::generateSIGFPE ( in short  way  ) 

A method which will generate the SIGFPE signal This can be used to test what happens when there is a floating point exception in a component

Parameters:
way parameter used to specify the way to generate the SIGFPE way == 0: Send SIGFPE signal with the kill() function way == 1: Generate a floating point exception by dividing by 0

void acsexmplErrorComponent::ErrorComponent::generateSIGSEGV ( in short  way  ) 

A method which will generate the SIGSEGV signal This can be used to test what happens when there is a segmentation fault in a component

Parameters:
way parameter used to specify the way to generate the SIGSEGV way == 0: Send SIGSEGV signal with the kill() function way == 1: Generate a segmentation fault by accessing to a null pointer

void acsexmplErrorComponent::ErrorComponent::outCompletion ( out ACSErr::Completion  comp  ) 

a Simple method that returns an ACSErr::Completion as an out parameter

Parameters:
comp Completion as out parameter

void acsexmplErrorComponent::ErrorComponent::sleepingCmd ( in short  nb_seconds  ) 

A method that will sleep during nb_seconds seconds before to return This method could be used to test the behavior of components taking a long time before to reply.

Parameters:
nb_seconds the number of seconds to sleep before to return

void acsexmplErrorComponent::ErrorComponent::typeException ( in short  depth  )  raises (ACSErrTypeCommon::GenericErrorEx, ACSErrTypeCommon::ACSErrTypeCommonEx)

Method that throws an ACSException on the type level (ACSErrTypeCommon::ACSErrTypeCommonEx). Since we do not have hierarchy in IDL, we have to specify here code and type exception. This means that this method can throw GenericErrorEx but also any exception in the ACSErrTypeCommonEx type.

Parameters:
depth depth of the error trace
Returns:
void


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