ARA ROOT v3.10 Software

AraWebPlotter/configLib/configError.cxx

00001 /* configError.c - Error reporting functions for config file handling */
00002 
00003 /* G.J.Crone, University College London */
00004 
00005 /*
00006  * Current CVS Tag:
00007  * $Header: /work1/anitaCVS/flightSoft/common/configLib/configError.c,v 1.1 2004/08/31 15:48:09 rjn Exp $
00008  */
00009  
00010 /* 
00011  * Modification History : DO NOT EDIT - MAINTAINED BY CVS 
00012  * $Log: configError.c,v $
00013  * Revision 1.1  2004/08/31 15:48:09  rjn
00014  * Um... lots of additions. The biggest ones are switching from shared to static libraries, and the additon of configLib and kvpLib to read formatted config files. These two libraries were created by Gordon Crone (gjc@hep.ucl.ac.uk) and are in spirit released under the GPL license.
00015  * Also the first of the actually programs (Eventd) has been started. At the moment it just opens a socket to fakeAcqd. Other sockets and better handling of multiple sockets in socketLib are the next things on my to do list.
00016  *
00017  * Revision 1.2  2001/08/17 16:30:53  gjc
00018  * Return an error if a value is given outside the context of any section.
00019  *
00020  * Revision 1.1  2001/07/24 13:36:43  gjc
00021  * First check in of new package
00022  *
00023  *
00024  *
00025  */ 
00026 
00027 /*
00028 DESCRIPTION
00029 <Insert a description of the file/module here>
00030 INCLUDE FILES: <place list of any relevant header files here>
00031 */
00032 
00033 /* includes */
00034 
00035 #include "configLib/configLib.h"
00036 #include "kvpLib/keyValuePair.h"
00037 
00038 /* defines */
00039 
00040 /* typedefs */
00041 
00042 /* globals */   
00043 
00044 /* locals */
00045 
00046 /* forward declarations */
00047 
00048 const char* configErrorString (
00049                          ConfigErrorCode code
00050                          )
00051 {
00052    char* string ;
00053 
00054    switch (code) {
00055    case CONFIG_E_OK :
00056       return "Success" ;
00057       break ;
00058    case CONFIG_E_NOFILE :
00059       return "File not found" ;
00060       break ;
00061    case CONFIG_E_NESTING :
00062       return "Nested sections not supported" ;
00063       break ;
00064    case CONFIG_E_EOF :
00065       return "End of file during parsing" ;
00066       break ;
00067    case CONFIG_E_SYSTEM :
00068       return "Error during system call" ;
00069       break ;
00070    case CONFIG_E_KVP :
00071       return "Error during kvpParse" ;
00072       break ;
00073    case CONFIG_E_SECTION :
00074       return "Requested section not found" ;
00075       break ;
00076    case CONFIG_E_UNNAMED :
00077       return "Unnamed sections not allowed" ;
00078       break ;
00079    default :
00080       return "Unknown error code" ;
00081    }
00082 
00083    return (string) ;
00084 }
00085 
00086 

Generated on Tue Jul 16 16:58:01 2013 for ARA ROOT v3.10 Software by doxygen 1.4.7