Main Page | Modules

Exception handling functions.


Functions

void fwUkl1ExceptionHandling_display (dyn_string &exceptionInfo)
void fwUkl1ExceptionHandling_setDisplayPanel (const string &panel)
string fwUkl1ExceptionHandling_getDisplayPanel ()
void _fwUkl1ExceptionHandling_display (const string &exceptionTreeName, string sExceptionInfo)
string _fwUkl1ExceptionHandling_createTreeBaseNode (shape &exceptionTree, dyn_string &exceptionInfo)
void _fwUkl1ExceptionHandling_createTree (shape &exceptionTree, dyn_string &exceptionInfo, string &baseNodeId, string &exceptId)

Detailed Description

Contains the functions that are used to convert the dyn_string form of the exception chain into an exception tree and display it on a PVSS tree shape.

Function Documentation

void _fwUkl1ExceptionHandling_createTree shape &  exceptionTree,
dyn_string &  exceptionInfo,
string &  baseNodeId,
string &  exceptId
 

This creates the exception tree with the given node as a base. A check must have been made that the exception does not already exist in the tree. This function assumes that it does not.

Parameters:
exceptionTree Reference to the shape that will display the exception tree. No checks are made on the existance of this shape, so calling functions must ensure that it exists.
exceptionInfo An array of strings that contains an exception tree built up with the UKL1 library.
baseNodeId ID of the node that the exception tree is to descend from. If an empty string is given the root node of the exception tree shape will be used.
exceptId This is the number that uniquely identifies the exception.
Returns:
void.

string _fwUkl1ExceptionHandling_createTreeBaseNode shape &  exceptionTree,
dyn_string &  exceptionInfo
 

This creates the base node to be used in the tree for this exception chain. If the base node it wishes to use already exists then this will be returned for the parent ID and no changes are made to it. Otherwise the function creates a node and returns the ID of this node.

Parameters:
exceptionTree Reference to the shape that will display the exception tree. No checks are made on the existance of this shape, so calling functions must ensure that it exists.
exceptionInfo An array of strings that contains an exception tree built up with the UKL1 library.
Returns:
string ID of the node that has been created. It should be the base node for the rest of the exception chain in the tree.

void _fwUkl1ExceptionHandling_display const string &  exceptionTreeName,
string  sExceptionInfo
 

Takes an exception chain in the form of a `|' delimited string and converts this into a tree structure displayed on a PVSS tree shape.

Parameters:
exceptionTreeName Name of the tree widget shape that the exception tree is to be displayed on.
sExceptionInfo An array of strings that contains an exception tree built up with the UKL1 library.
Returns:
void.
In the event that display cannot parse the exception information it is handled via fwExceptionHandling_display() if it is believed to be still in a form it can handle, otherwise it is sent to the PVSS log. This will not display the last exception in the tree as this is used to create the base node for the tree. It should be ensured that this has been created appropriately.

void fwUkl1ExceptionHandling_display dyn_string &  exceptionInfo  ) 
 

Opens the panel defined by gsFwUkl1ExceptionHandlingDisplayPanel displaying the exception chain given by exceptionInfo. If the dyn_string is empty no panel is displayed.

Parameters:
exceptionInfo Exception chain that is to be displayed. It will be cleared by a call to this function.
Returns:
void.
The form of exceptionInfo is checked to ensure that it is of an appropriate form to be displayed in a tree with fwUkl1ExceptionHandlingDisplay.pnl, if it cannot be displayed with this panel then it is displayed via fwExceptionHandling_display(). In both cases a call to fwUkl1ExceptionHandling_display() will clear the contents of exceptionInfo, as defined in the framework guidelines.

Example

   (...)
   //Create a dyn_string to hold the exception information.
   dyn_string exceptionInfo;
   //Call a function, that could generate an error.
   thisFunction(exceptionInfo);
   //If an error has been generated it will be displayed otherwise nothing will occur.
   fwUkl1ExceptionHandling_display(exceptionInfo);
   //Note that exception info is now definately empty, for example a call to fwUkl1ExceptionLog_submit() would do nothing.
   (...)

string fwUkl1ExceptionHandling_getDisplayPanel  ) 
 

Returns the full path and name of the panel that is used to display the exception chain by fwUkl1ExceptionHandling_display().

Returns:
string Full path and name of the panel.

void fwUkl1ExceptionHandling_setDisplayPanel const string &  panel  ) 
 

Sets the panel used to display the exceptionInfo dyn_string given to fwUkl1ExceptionHandling_display().

Parameters:
panel The full path and name of the panel that is opened by fwUkl1ExceptionHandling_display().
Returns:
void.


Generated on Fri Jun 8 14:46:30 2007 by  doxygen 1.3.9.1