Public Member Functions | |
void | displayMessage () |
void | badMethod (short depth) throws GenericErrorEx |
void | corbaSystemException () throws org.omg.CORBA.SystemException |
void | exceptionFromCompletion (short depth) throws GenericErrorEx |
void | typeException (short depth) throws ACSErrTypeCommonEx |
Completion | completionFromException (short depth) |
Completion | completionFromCompletion (short depth) |
Completion | completionOnStack (short depth) |
void | outCompletion (alma.ACSErr.CompletionHolder comp) |
void | generateSIGFPE (short way) |
void | generateSIGSEGV (short way) |
void | sleepingCmd (short nbSeconds) |
Implementation of the ErrorComponent
interface, which should demonstrate proper use of the ACS error system in Java.
Note on logging: unlike in the C++ implementation of this component, here we do not log the invocation of every method, because the Java container does this automatically. In general the component should only trace the invocations itself if it needs to add custom data to the log.
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.badMethod | ( | short | depth | ) | throws GenericErrorEx |
An intentionally bad method that throws an exception (GenericErrorEx
) if depth
> 0. This exception has causing exception if depth > 1. All exceptions get added to the ErrorTrace
list which will transport them over CORBA.
Note that the thrown CORBA exception GenericErrorEx
only acts as a vehicle for the embedded ErrorTrace
linked list which contains the real data of the exception(s).
Completion alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.completionFromCompletion | ( | short | depth | ) |
References alma.acs.exceptions.AcsJCompletion.toCorbaCompletion().
Completion alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.completionFromException | ( | short | depth | ) |
References alma.acs.exceptions.AcsJCompletion.toCorbaCompletion().
Referenced by alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.completionOnStack().
Completion alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.completionOnStack | ( | short | depth | ) |
Forwards to completionFromException(short) because in Java we can't create objects on the stack, so there is no distinction to be made.
References alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.completionFromException().
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.corbaSystemException | ( | ) | throws org.omg.CORBA.SystemException |
An intentionally bad method that throws a CORBA.BAD_PARAM system exception to show how to handle CORBA System Exceptions
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.displayMessage | ( | ) |
References alma.acs.component.ComponentImplBase.m_logger.
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.exceptionFromCompletion | ( | short | depth | ) | throws GenericErrorEx |
This method throws a GenericErrorEx
exception if the completion returned from internalCompletionMethod(int) has an associated exception. This will be the case if the depth
parameter is > 0.
References alma.acs.exceptions.AcsJCompletion.getAcsJException(), and alma.acs.exceptions.AcsJCompletion.isError().
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.generateSIGFPE | ( | short | way | ) |
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.generateSIGSEGV | ( | short | way | ) |
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.outCompletion | ( | alma.ACSErr.CompletionHolder | comp | ) |
this method returns a Completion as an out parameter.
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.sleepingCmd | ( | short | nbSeconds | ) |
References alma.acs.component.ComponentImplBase.m_logger.
void alma.acsexmplErrorComponent.ErrorComponentImpl.ErrorComponentImpl.typeException | ( | short | depth | ) | throws ACSErrTypeCommonEx |