Main Page | Modules | Data Structures | File List | Data Fields

/extra/work/state-dev/src/sul/sul_error_codes.h

00001 /* ----------------------------------------------------------------------------
00002  * $Id: sul_error_codes.h,v 1.3 2004/04/05 20:58:09 jlewalle Exp $
00003  *
00004  * --------------------------------------------------------------------------*/
00005 #if !defined(_INCLUDED_SUL_ERROR_CODES_H_HEADER__)
00006 #define _INCLUDED_SUL_ERROR_CODES_H_HEADER__
00007 
00008 /* Process this file if we're building an error array, or if we have
00009    not defined the enumerated constants yet.  */
00010 #if defined(SUL_ERROR_BUILD_ARRAY) || !defined(SUL_ERROR_ENUM_DEFINED)
00011 
00012 #if defined(SUL_ERROR_BUILD_ARRAY)
00013 
00014 #define SUL_ERROR_START \
00015 static const err_defn error_table[] = { \
00016 #define SUL_ERRDEF(n, s) { n, s },
00017 #define SUL_ERROR_END { 0, NULL } };
00018 
00019 #elif !defined(SUL_ERROR_ENUM_DEFINED)
00020 
00021 #define SUL_ERROR_START \
00022 typedef enum sul_errno_t { \
00023 #define SUL_ERRDEF(n, s) n,
00024 #define SUL_ERROR_END SUL_ERR_LAST } sul_errno_t;
00025 
00026 #define SUL_ERROR_ENUM_DEFINED
00027 
00028 #endif
00029 
00030 SUL_ERROR_START
00031 
00032 SUL_ERRDEF(SUL_ERR_DB_NO_ROWS,
00033    "No rows were returned from an SQL query, and some were expected.")
00034 SUL_ERRDEF(SUL_ERR_DB_TOO_MANY_ROWS,
00035    "Too many rows were returned by an SQL query.")
00036 SUL_ERRDEF(SUL_ERR_GENERAL,
00037    "A general hiccup occured.")
00038 
00039 SUL_ERROR_END
00040 
00041 #undef SUL_ERROR_START
00042 #undef SUL_ERRDEF
00043 #undef SUL_ERROR_END
00044 
00045 #endif /* defined(SUL_ERROR_BUILD_ARRAY) || !defined(SUL_ERROR_ENUM_DEFINED) */
00046 
00047 #endif

Generated on Wed Apr 28 09:38:33 2004 for State by doxygen 1.3.5