From 7cb4cf114075c1a9cad7d74e22e8491bc28ed806 Mon Sep 17 00:00:00 2001 From: dsandersoremutah Date: Tue, 9 May 2006 22:48:32 +0000 Subject: [PATCH] Got rid of errorString. Renumbered error codes. Got rid of error string tables. git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@401 0109f412-320b-0410-ab79-c3e0c5ffbbe6 --- ftk/src/ftk.h | 358 ++++++++++++-------------- ftk/src/ftkerror.cpp | 296 ---------------------- ftk/src/ftkmisc.cpp | 5 - ftk/src/ftkprntf.cpp | 5 +- ftk/src/ftksys.h | 2 - xflaim/sample/sample.cpp | 5 +- xflaim/src/fdom.cpp | 24 +- xflaim/src/flaimsys.h | 13 - xflaim/src/flerror.cpp | 355 -------------------------- xflaim/src/fsysdata.cpp | 7 - xflaim/src/xflaim.h | 476 +++++++++++++++++------------------ xflaim/util/basictestsrv.cpp | 3 +- xflaim/util/checkdb.cpp | 10 +- xflaim/util/domedit.cpp | 14 +- xflaim/util/fdomedt.cpp | 6 +- xflaim/util/flmunittest.h | 4 +- xflaim/util/fshell.cpp | 8 +- xflaim/util/rebuild.cpp | 15 +- xflaim/util/rfltestsrv.cpp | 3 +- xflaim/util/view.cpp | 3 +- xflaim/util/viewdisp.cpp | 3 +- 21 files changed, 435 insertions(+), 1180 deletions(-) diff --git a/ftk/src/ftk.h b/ftk/src/ftk.h index d287183..bdb7144 100644 --- a/ftk/src/ftk.h +++ b/ftk/src/ftk.h @@ -392,45 +392,48 @@ Desc: Language constants ****************************************************************************/ - #define FLM_US_LANG 0 // English, United States - #define FLM_AF_LANG 1 // Afrikaans - #define FLM_AR_LANG 2 // Arabic - #define FLM_CA_LANG 3 // Catalan - #define FLM_HR_LANG 4 // Croatian - #define FLM_CZ_LANG 5 // Czech - #define FLM_DK_LANG 6 // Danish - #define FLM_NL_LANG 7 // Dutch - #define FLM_OZ_LANG 8 // English, Australia - #define FLM_CE_LANG 9 // English, Canada - #define FLM_UK_LANG 10 // English, United Kingdom - #define FLM_FA_LANG 11 // Farsi - #define FLM_SU_LANG 12 // Finnish - #define FLM_CF_LANG 13 // French, Canada - #define FLM_FR_LANG 14 // French, France - #define FLM_GA_LANG 15 // Galician - #define FLM_DE_LANG 16 // German, Germany - #define FLM_SD_LANG 17 // German, Switzerland - #define FLM_GR_LANG 18 // Greek - #define FLM_HE_LANG 19 // Hebrew - #define FLM_HU_LANG 20 // Hungarian - #define FLM_IS_LANG 21 // Icelandic - #define FLM_IT_LANG 22 // Italian - #define FLM_NO_LANG 23 // Norwegian - #define FLM_PL_LANG 24 // Polish - #define FLM_BR_LANG 25 // Portuguese, Brazil - #define FLM_PO_LANG 26 // Portuguese, Portugal - #define FLM_RU_LANG 27 // Russian - #define FLM_SL_LANG 28 // Slovak - #define FLM_ES_LANG 29 // Spanish - #define FLM_SV_LANG 30 // Swedish - #define FLM_YK_LANG 31 // Ukrainian - #define FLM_UR_LANG 32 // Urdu - #define FLM_TK_LANG 33 // Turkey - #define FLM_JP_LANG 34 // Japanese - #define FLM_KO_LANG 35 // Korean - #define FLM_CT_LANG 36 // Chinese-Traditional - #define FLM_CS_LANG 37 // Chinese-Simplified - #define FLM_LA_LANG 38 // another Asian language + /// \addtogroup flm_languages + /// @{ + #define FLM_US_LANG 0 ///< English, United States + #define FLM_AF_LANG 1 ///< Afrikaans + #define FLM_AR_LANG 2 ///< Arabic + #define FLM_CA_LANG 3 ///< Catalan + #define FLM_HR_LANG 4 ///< Croatian + #define FLM_CZ_LANG 5 ///< Czech + #define FLM_DK_LANG 6 ///< Danish + #define FLM_NL_LANG 7 ///< Dutch + #define FLM_OZ_LANG 8 ///< English, Australia + #define FLM_CE_LANG 9 ///< English, Canada + #define FLM_UK_LANG 10 ///< English, United Kingdom + #define FLM_FA_LANG 11 ///< Farsi + #define FLM_SU_LANG 12 ///< Finnish + #define FLM_CF_LANG 13 ///< French, Canada + #define FLM_FR_LANG 14 ///< French, France + #define FLM_GA_LANG 15 ///< Galician + #define FLM_DE_LANG 16 ///< German, Germany + #define FLM_SD_LANG 17 ///< German, Switzerland + #define FLM_GR_LANG 18 ///< Greek + #define FLM_HE_LANG 19 ///< Hebrew + #define FLM_HU_LANG 20 ///< Hungarian + #define FLM_IS_LANG 21 ///< Icelandic + #define FLM_IT_LANG 22 ///< Italian + #define FLM_NO_LANG 23 ///< Norwegian + #define FLM_PL_LANG 24 ///< Polish + #define FLM_BR_LANG 25 ///< Portuguese, Brazil + #define FLM_PO_LANG 26 ///< Portuguese, Portugal + #define FLM_RU_LANG 27 ///< Russian + #define FLM_SL_LANG 28 ///< Slovak + #define FLM_ES_LANG 29 ///< Spanish + #define FLM_SV_LANG 30 ///< Swedish + #define FLM_YK_LANG 31 ///< Ukrainian + #define FLM_UR_LANG 32 ///< Urdu + #define FLM_TK_LANG 33 ///< Turkey + #define FLM_JP_LANG 34 ///< Japanese + #define FLM_KO_LANG 35 ///< Korean + #define FLM_CT_LANG 36 ///< Chinese-Traditional + #define FLM_CS_LANG 37 ///< Chinese-Simplified + #define FLM_LA_LANG 38 ///< another Asian language + /// @} #define FLM_LAST_LANG (FLM_LA_LANG + 1) #define FLM_FIRST_DBCS_LANG (FLM_JP_LANG) @@ -3351,38 +3354,6 @@ const char * pszSourceFile, const char * pszData); - /**************************************************************************** - Desc: Status and return codes - ****************************************************************************/ - #ifndef RC_OK - #define RC_OK( rc) ((rc) == 0) - #endif - - #ifndef RC_BAD - #define RC_BAD( rc) ((rc) != 0) - #endif - - #define FTK_ERROR_BASE(e) ((RCODE)((int)(0x81055000+(e)))) - #define FTK_ERROR_END ((RCODE)((int)(0x81055FFF))) - - const char * FLMAPI f_errorString( - RCODE rc); - - RCODE FLMAPI f_mapPlatformError( - FLMINT iError, - RCODE defaultRc); - - FINLINE FLMBOOL FLMAPI f_isToolkitError( - RCODE rc) - { - if( rc > FTK_ERROR_BASE( 0) && rc < FTK_ERROR_END) - { - return( TRUE); - } - - return( FALSE); - } - /**************************************************************************** Desc: FTX ****************************************************************************/ @@ -3863,136 +3834,129 @@ /**************************************************************************** Desc: General errors ****************************************************************************/ - #define NE_FLM_OK 0 + /// \addtogroup ftk_errors + /// @{ + + #define NE_FLM_OK 0 ///< 0 - Operation was successful. - #define NE_FLM_FIRST_GENERAL_ERROR FTK_ERROR_BASE( 0x100) // NOTE: This is not an error code - do not document - #define NE_FLM_NOT_IMPLEMENTED FTK_ERROR_BASE( 0x101) // NE_NOT_IMPLEMENTED - Attempt was made to use a feature that is not implemented. - #define NE_FLM_MEM FTK_ERROR_BASE( 0x102) // NE_INSUFFICIENT_MEMORY - Attempt to allocate memory failed. - #define NE_FLM_INVALID_PARM FTK_ERROR_BASE( 0x103) // NE_INVALID_PARAMETER - Invalid parameter passed into a function. - #define NE_FLM_TIMEOUT FTK_ERROR_BASE( 0x104) // NE_WAIT_TIMEOUT - Database operation timed out (usually a query operation). - #define NE_FLM_NOT_FOUND FTK_ERROR_BASE( 0x105) // NE_OBJECT_NOT_FOUND - An object was not found. - #define NE_FLM_EXISTS FTK_ERROR_BASE( 0x106) // NE_OBJECT_ALREADY_EXISTS - Object already exists. - #define NE_FLM_USER_ABORT FTK_ERROR_BASE( 0x107) // NE_CALLBACK_CANCELLED - User or application aborted (canceled) the operation - #define NE_FLM_FAILURE FTK_ERROR_BASE( 0x108) // NE_RECOVERABLE_FAILURE - Internal failure. - #define NE_FLM_BOF_HIT FTK_ERROR_BASE( 0x109) // Beginning of results encountered. This error is may be returned when reading query results in reverse order (from last to first). - #define NE_FLM_EOF_HIT FTK_ERROR_BASE( 0x10A) // End of results encountered. This error may be returned when reading query results in forward order (first to last). - #define NE_FLM_CONV_BAD_DIGIT FTK_ERROR_BASE( 0x10B) // Non-numeric digit found in text to numeric conversion. - #define NE_FLM_CONV_DEST_OVERFLOW FTK_ERROR_BASE( 0x10C) // Destination buffer not large enough to hold data. - #define NE_FLM_CONV_ILLEGAL FTK_ERROR_BASE( 0x10D) // Attempt to convert between data types is an unsupported conversion. - #define NE_FLM_CONV_NULL_SRC FTK_ERROR_BASE( 0x10E) // Data source cannot be NULL when doing data conversion. - #define NE_FLM_CONV_NUM_OVERFLOW FTK_ERROR_BASE( 0x10F) // Numeric overflow (> upper bound) converting to numeric type. - #define NE_FLM_CONV_NUM_UNDERFLOW FTK_ERROR_BASE( 0x110) // Numeric underflow (< lower bound) converting to numeric type. - #define NE_FLM_SYNTAX FTK_ERROR_BASE( 0x111) // Syntax error while parsing XML or query. - #define NE_FLM_UNSUPPORTED_FEATURE FTK_ERROR_BASE( 0x112) // Attempting to use a feature for which full support has been disabled. - #define NE_FLM_FILE_EXISTS FTK_ERROR_BASE( 0x113) // Attempt to create a database, but the file already exists. - #define NE_FLM_COULD_NOT_CREATE_SEMAPHORE FTK_ERROR_BASE( 0x114) // Could not create a semaphore. - #define NE_FLM_BAD_UTF8 FTK_ERROR_BASE( 0x115) // An invalid byte sequence was found in a UTF-8 string - #define NE_FLM_ERROR_WAITING_ON_SEMPAHORE FTK_ERROR_BASE( 0x116) // Error occurred while waiting on a sempahore. - #define NE_FLM_BAD_PLATFORM_FORMAT FTK_ERROR_BASE( 0x117) // Cannot support platform format. NOTE: No need to document this one, it is strictly internal. - #define NE_FLM_BAD_SEN FTK_ERROR_BASE( 0x118) // Invalid simple encoded number. - #define NE_FLM_UNSUPPORTED_INTERFACE FTK_ERROR_BASE( 0x119) // Requested COM interface is not supported. - #define NE_FLM_BAD_RCODE_TABLE FTK_ERROR_BASE( 0x11A) // The error code tables are incorrect. NOTE: This is an internal error that does not need to be documented. - #define NE_FLM_BUFFER_OVERFLOW FTK_ERROR_BASE( 0x11B) // Buffer overflow. - #define NE_FLM_INVALID_XML FTK_ERROR_BASE( 0x11C) // Invalid XML encountered while parsing document. - #define NE_FLM_ILLEGAL_FLAG FTK_ERROR_BASE( 0x11D) // Illegal flag passed to getChildElement method. Must be zero for elements that can have non-unique child elements. - #define NE_FLM_ILLEGAL_OP FTK_ERROR_BASE( 0x11E) // Illegal operation - #define NE_FLM_COULD_NOT_START_THREAD FTK_ERROR_BASE( 0x11F) // Problem starting a new thread - #define NE_FLM_BAD_BASE64_ENCODING FTK_ERROR_BASE( 0x120) // Invalid base64 sequence encountered - #define NE_FLM_STREAM_EXISTS FTK_ERROR_BASE( 0x121) // Stream file already exists - #define NE_FLM_MULTIPLE_MATCHES FTK_ERROR_BASE( 0x122) // Multiple items matched but only one match was expected - #define NE_FLM_NOT_UNIQUE FTK_ERROR_BASE( 0x123) // Non-unique key - #define NE_FLM_BTREE_ERROR FTK_ERROR_BASE( 0x124) // Generic b-tree error - #define NE_FLM_BTREE_KEY_SIZE FTK_ERROR_BASE( 0x125) // Invalid b-tree key size - #define NE_FLM_BTREE_FULL FTK_ERROR_BASE( 0x126) // B-tree cannot grow beyond current size - #define NE_FLM_BTREE_BAD_STATE FTK_ERROR_BASE( 0x127) // B-tree operation cannot be completed - #define NE_FLM_COULD_NOT_CREATE_MUTEX FTK_ERROR_BASE( 0x128) // Mutex alloc / init failed - #define NE_FLM_DATA_ERROR FTK_ERROR_BASE( 0x129) - #define NE_FLM_CLASS_NOT_AVAILABLE FTK_ERROR_BASE( 0x12A) - #define NE_FLM_BAD_DATA_TYPE FTK_ERROR_BASE( 0x12B) - #define NE_FLM_READ_ONLY FTK_ERROR_BASE( 0x12C) - #define NE_FLM_KEY_OVERFLOW FTK_ERROR_BASE( 0x12D) - #define NE_FLM_UNEXPECTED_END_OF_INPUT FTK_ERROR_BASE( 0x12E) - #define NE_FLM_LAST_GENERAL_ERROR FTK_ERROR_BASE( 0x12F) // NOTE: This is not an error code - do not document + // Error codes that need to be the same as they were for FLAIM + + #define NE_FLM_BOF_HIT 0xC001 ///< 0xC001 - Beginning of results encountered. + #define NE_FLM_EOF_HIT 0xC002 ///< 0xC002 - End of results encountered. + #define NE_FLM_EXISTS 0xC004 ///< 0xC004 - Object already exists. + #define NE_FLM_FAILURE 0xC005 ///< 0xC005 - Internal failure. + #define NE_FLM_NOT_FOUND 0xC006 ///< 0xC006 - An object was not found. + #define NE_FLM_BTREE_ERROR 0xC012 ///< 0xC012 - Corruption found in b-tree. + #define NE_FLM_BTREE_FULL 0xC013 ///< 0xC013 - B-tree cannot grow beyond current size. + #define NE_FLM_CONV_DEST_OVERFLOW 0xC01C ///< 0xC01C - Destination buffer not large enough to hold data. + #define NE_FLM_CONV_ILLEGAL 0xC01D ///< 0xC01D - Attempt to convert between data types is an unsupported conversion. + #define NE_FLM_CONV_NUM_OVERFLOW 0xC020 ///< 0xC020 - Numeric overflow (> upper bound) converting to numeric type. + #define NE_FLM_DATA_ERROR 0xC022 ///< 0xC022 - Corruption found in b-tree. + #define NE_FLM_ILLEGAL_OP 0xC026 ///< 0xC026 - Illegal operation + #define NE_FLM_MEM 0xC037 ///< 0xC037 - Attempt to allocate memory failed. + #define NE_FLM_NOT_UNIQUE 0xC03E ///< 0xC03E - Non-unique key. + #define NE_FLM_SYNTAX 0xC045 ///< 0xC045 - Syntax error while parsing. + #define NE_FLM_NOT_IMPLEMENTED 0xC05F ///< 0xC05F - Attempt was made to use a feature that is not implemented. + #define NE_FLM_INVALID_PARM 0xC08B ///< 0xC08B - Invalid parameter passed into a function. + + // I/O Errors - Must be the same as they were for FLAIM. + + #define NE_FLM_IO_ACCESS_DENIED 0xC201 ///< 0xC201 - Access to file is denied.\ Caller is not allowed access to a file. + #define NE_FLM_IO_BAD_FILE_HANDLE 0xC202 ///< 0xC202 - Bad file handle or file descriptor. + #define NE_FLM_IO_COPY_ERR 0xC203 ///< 0xC203 - Error occurred while copying a file. + #define NE_FLM_IO_DISK_FULL 0xC204 ///< 0xC204 - Disk full. + #define NE_FLM_IO_END_OF_FILE 0xC205 ///< 0xC205 - End of file reached while reading from the file. + #define NE_FLM_IO_OPEN_ERR 0xC206 ///< 0xC206 - Error while opening the file. + #define NE_FLM_IO_SEEK_ERR 0xC207 ///< 0xC207 - Error occurred while positioning (seeking) within a file. + #define NE_FLM_IO_DIRECTORY_ERR 0xC208 ///< 0xC208 - Error occurred while accessing or deleting a directory. + #define NE_FLM_IO_PATH_NOT_FOUND 0xC209 ///< 0xC209 - File not found. + #define NE_FLM_IO_TOO_MANY_OPEN_FILES 0xC20A ///< 0xC20A - Too many files open. + #define NE_FLM_IO_PATH_TOO_LONG 0xC20B ///< 0xC20B - File name too long. + #define NE_FLM_IO_NO_MORE_FILES 0xC20C ///< 0xC20C - No more files in directory. + #define NE_FLM_IO_DELETING_FILE 0xC20D ///< 0xC20D - Error occurred while deleting a file. + #define NE_FLM_IO_FILE_LOCK_ERR 0xC20E ///< 0xC20E - Error attempting to acquire a byte-range lock on a file. + #define NE_FLM_IO_FILE_UNLOCK_ERR 0xC20F ///< 0xC20F - Error attempting to release a byte-range lock on a file. + #define NE_FLM_IO_PATH_CREATE_FAILURE 0xC210 ///< 0xC210 - Error occurred while attempting to create a directory or sub-directory. + #define NE_FLM_IO_RENAME_FAILURE 0xC211 ///< 0xC211 - Error occurred while renaming a file. + #define NE_FLM_IO_INVALID_PASSWORD 0xC212 ///< 0xC212 - Invalid file password. + #define NE_FLM_SETTING_UP_FOR_READ 0xC213 ///< 0xC213 - Error occurred while setting up to perform a file read operation. + #define NE_FLM_SETTING_UP_FOR_WRITE 0xC214 ///< 0xC214 - Error occurred while setting up to perform a file write operation. + #define NE_FLM_IO_CANNOT_REDUCE_PATH 0xC215 ///< 0xC215 - Cannot reduce file name into more components. + #define NE_FLM_INITIALIZING_IO_SYSTEM 0xC216 ///< 0xC216 - Error occurred while setting up to access the file system. + #define NE_FLM_FLUSHING_FILE 0xC217 ///< 0xC217 - Error occurred while flushing file data buffers to disk. + #define NE_FLM_IO_INVALID_FILENAME 0xC218 ///< 0xC218 - Invalid file name. + #define NE_FLM_IO_CONNECT_ERROR 0xC219 ///< 0xC219 - Error connecting to a remote network resource. + #define NE_FLM_OPENING_FILE 0xC21A ///< 0xC21A - Unexpected error occurred while opening a file. + #define NE_FLM_DIRECT_OPENING_FILE 0xC21B ///< 0xC21B - Unexpected error occurred while opening a file in direct access mode. + #define NE_FLM_CREATING_FILE 0xC21C ///< 0xC21C - Unexpected error occurred while creating a file. + #define NE_FLM_DIRECT_CREATING_FILE 0xC21D ///< 0xC21D - Unexpected error occurred while creating a file in direct access mode. + #define NE_FLM_READING_FILE 0xC21E ///< 0xC21E - Unexpected error occurred while reading a file. + #define NE_FLM_DIRECT_READING_FILE 0xC21F ///< 0xC21F - Unexpected error occurred while reading a file in direct access mode. + #define NE_FLM_WRITING_FILE 0xC220 ///< 0xC220 - Unexpected error occurred while writing to a file. + #define NE_FLM_DIRECT_WRITING_FILE 0xC221 ///< 0xC221 - Unexpected error occurred while writing a file in direct access mode. + #define NE_FLM_POSITIONING_IN_FILE 0xC222 ///< 0xC222 - Unexpected error occurred while positioning within a file. + #define NE_FLM_GETTING_FILE_SIZE 0xC223 ///< 0xC223 - Unexpected error occurred while getting a file's size. + #define NE_FLM_TRUNCATING_FILE 0xC224 ///< 0xC224 - Unexpected error occurred while truncating a file. + #define NE_FLM_PARSING_FILE_NAME 0xC225 ///< 0xC225 - Unexpected error occurred while parsing a file's name. + #define NE_FLM_CLOSING_FILE 0xC226 ///< 0xC226 - Unexpected error occurred while closing a file. + #define NE_FLM_GETTING_FILE_INFO 0xC227 ///< 0xC227 - Unexpected error occurred while getting information about a file. + #define NE_FLM_EXPANDING_FILE 0xC228 ///< 0xC228 - Unexpected error occurred while expanding a file. + #define NE_FLM_CHECKING_FILE_EXISTENCE 0xC229 ///< 0xC229 - Unexpected error occurred while checking to see if a file exists. + #define NE_FLM_RENAMING_FILE 0xC22A ///< 0xC22A - Unexpected error occurred while renaming a file. + #define NE_FLM_SETTING_FILE_INFO 0xC22B ///< 0xC22B - Unexpected error occurred while setting a file's information. + + // Stream Errors - These are new + + #define NE_FLM_STREAM_DECOMPRESS_ERROR 0xC400 ///< 0xC400 - Error decompressing data stream. + #define NE_FLM_STREAM_NOT_COMPRESSED 0xC401 ///< 0xC401 - Attempting to decompress a data stream that is not compressed. + #define NE_FLM_STREAM_TOO_MANY_FILES 0xC402 ///< 0xC402 - Too many files in input stream. + + // Miscellaneous new toolkit errors + + #define NE_FLM_COULD_NOT_CREATE_SEMAPHORE 0xC500 ///< 0xC500 - Could not create a semaphore. + #define NE_FLM_BAD_UTF8 0xC501 ///< 0xC501 - An invalid byte sequence was found in a UTF-8 string + #define NE_FLM_ERROR_WAITING_ON_SEMPAHORE 0xC502 ///< 0xC502 - Error occurred while waiting on a sempahore. + #define NE_FLM_BAD_SEN 0xC503 ///< 0xC503 - Invalid simple encoded number. + #define NE_FLM_COULD_NOT_START_THREAD 0xC504 ///< 0xC504 - Problem starting a new thread. + #define NE_FLM_BAD_BASE64_ENCODING 0xC505 ///< 0xC505 - Invalid base64 sequence encountered. + #define NE_FLM_STREAM_EXISTS 0xC506 ///< 0xC506 - Stream file already exists. + #define NE_FLM_MULTIPLE_MATCHES 0xC507 ///< 0xC507 - Multiple items matched but only one match was expected. + #define NE_FLM_BTREE_KEY_SIZE 0xC508 ///< 0xC508 - Invalid b-tree key size. + #define NE_FLM_BTREE_BAD_STATE 0xC509 ///< 0xC509 - B-tree operation cannot be completed. + #define NE_FLM_COULD_NOT_CREATE_MUTEX 0xC50A ///< 0xC50A - Error occurred while creating or initializing a mutex. + + // Network Errors - Must be the same as they were for FLAIM + + #define NE_FLM_NOIP_ADDR 0xC900 ///< 0xC900 - IP address not found + #define NE_FLM_SOCKET_FAIL 0xC901 ///< 0xC901 - IP socket failure + #define NE_FLM_CONNECT_FAIL 0xC902 ///< 0xC902 - TCP/IP connection failure + #define NE_FLM_BIND_FAIL 0xC903 ///< 0xC903 - The TCP/IP services on your system may not be configured or installed. + #define NE_FLM_LISTEN_FAIL 0xC904 ///< 0xC904 - TCP/IP listen failed + #define NE_FLM_ACCEPT_FAIL 0xC905 ///< 0xC905 - TCP/IP accept failed + #define NE_FLM_SELECT_ERR 0xC906 ///< 0xC906 - TCP/IP select failed + #define NE_FLM_SOCKET_SET_OPT_FAIL 0xC907 ///< 0xC907 - TCP/IP socket operation failed + #define NE_FLM_SOCKET_DISCONNECT 0xC908 ///< 0xC908 - TCP/IP disconnected + #define NE_FLM_SOCKET_READ_FAIL 0xC909 ///< 0xC909 - TCP/IP read failed + #define NE_FLM_SOCKET_WRITE_FAIL 0xC90A ///< 0xC90A - TCP/IP write failed + #define NE_FLM_SOCKET_READ_TIMEOUT 0xC90B ///< 0xC90B - TCP/IP read timeout + #define NE_FLM_SOCKET_WRITE_TIMEOUT 0xC90C ///< 0xC90C - TCP/IP write timeout + #define NE_FLM_SOCKET_ALREADY_CLOSED 0xC90D ///< 0xC90D - Connection already closed + + /// @} /**************************************************************************** - Desc: I/O Errors + Desc: Status and return codes ****************************************************************************/ + #ifndef RC_OK + #define RC_OK( rc) ((rc) == NE_FLM_OK) + #endif - #define NE_FLM_FIRST_IO_ERROR FTK_ERROR_BASE( 0x200) // NOTE: This is not an error code - do not document - #define NE_FLM_IO_ACCESS_DENIED FTK_ERROR_BASE( 0x201) // Access to file is denied. Caller is not allowed access to a file. - #define NE_FLM_IO_BAD_FILE_HANDLE FTK_ERROR_BASE( 0x202) // Bad file handle or file descriptor. - #define NE_FLM_IO_COPY_ERR FTK_ERROR_BASE( 0x203) // Error occurred while copying a file. - #define NE_FLM_IO_DISK_FULL FTK_ERROR_BASE( 0x204) // Disk full. - #define NE_FLM_IO_END_OF_FILE FTK_ERROR_BASE( 0x205) // End of file reached while reading from the file. - #define NE_FLM_IO_OPEN_ERR FTK_ERROR_BASE( 0x206) // Error while opening the file. - #define NE_FLM_IO_SEEK_ERR FTK_ERROR_BASE( 0x207) // Error occurred while positioning (seeking) within a file. - #define NE_FLM_IO_DIRECTORY_ERR FTK_ERROR_BASE( 0x208) // Error occurred while accessing or deleting a directory. - #define NE_FLM_IO_PATH_NOT_FOUND FTK_ERROR_BASE( 0x209) // File not found. - #define NE_FLM_IO_TOO_MANY_OPEN_FILES FTK_ERROR_BASE( 0x20A) // Too many files open. - #define NE_FLM_IO_PATH_TOO_LONG FTK_ERROR_BASE( 0x20B) // File name too long. - #define NE_FLM_IO_NO_MORE_FILES FTK_ERROR_BASE( 0x20C) // No more files in directory. - #define NE_FLM_IO_DELETING_FILE FTK_ERROR_BASE( 0x20D) // Error occurred while deleting a file. - #define NE_FLM_IO_FILE_LOCK_ERR FTK_ERROR_BASE( 0x20E) // Error attempting to acquire a byte-range lock on a file. - #define NE_FLM_IO_FILE_UNLOCK_ERR FTK_ERROR_BASE( 0x20F) // Error attempting to release a byte-range lock on a file. - #define NE_FLM_IO_PATH_CREATE_FAILURE FTK_ERROR_BASE( 0x210) // Error occurred while attempting to create a directory or sub-directory. - #define NE_FLM_IO_RENAME_FAILURE FTK_ERROR_BASE( 0x211) // Error occurred while renaming a file. - #define NE_FLM_IO_INVALID_PASSWORD FTK_ERROR_BASE( 0x212) // Invalid file password. - #define NE_FLM_SETTING_UP_FOR_READ FTK_ERROR_BASE( 0x213) // Error occurred while setting up to perform a file read operation. - #define NE_FLM_SETTING_UP_FOR_WRITE FTK_ERROR_BASE( 0x214) // Error occurred while setting up to perform a file write operation. - #define NE_FLM_IO_CANNOT_REDUCE_PATH FTK_ERROR_BASE( 0x215) // Cannot reduce file name into more components. - #define NE_FLM_INITIALIZING_IO_SYSTEM FTK_ERROR_BASE( 0x216) // Error occurred while setting up to access the file system. - #define NE_FLM_FLUSHING_FILE FTK_ERROR_BASE( 0x217) // Error occurred while flushing file data buffers to disk. - #define NE_FLM_IO_INVALID_FILENAME FTK_ERROR_BASE( 0x218) // Invalid file name. - #define NE_FLM_IO_CONNECT_ERROR FTK_ERROR_BASE( 0x219) // Error connecting to a remote network resource. - #define NE_FLM_OPENING_FILE FTK_ERROR_BASE( 0x21A) // Unexpected error occurred while opening a file. - #define NE_FLM_DIRECT_OPENING_FILE FTK_ERROR_BASE( 0x21B) // Unexpected error occurred while opening a file in direct access mode. - #define NE_FLM_CREATING_FILE FTK_ERROR_BASE( 0x21C) // Unexpected error occurred while creating a file. - #define NE_FLM_DIRECT_CREATING_FILE FTK_ERROR_BASE( 0x21D) // Unexpected error occurred while creating a file in direct access mode. - #define NE_FLM_READING_FILE FTK_ERROR_BASE( 0x21E) // Unexpected error occurred while reading a file. - #define NE_FLM_DIRECT_READING_FILE FTK_ERROR_BASE( 0x21F) // Unexpected error occurred while reading a file in direct access mode. - #define NE_FLM_WRITING_FILE FTK_ERROR_BASE( 0x220) // Unexpected error occurred while writing to a file. - #define NE_FLM_DIRECT_WRITING_FILE FTK_ERROR_BASE( 0x221) // Unexpected error occurred while writing a file in direct access mode. - #define NE_FLM_POSITIONING_IN_FILE FTK_ERROR_BASE( 0x222) // Unexpected error occurred while positioning within a file. - #define NE_FLM_GETTING_FILE_SIZE FTK_ERROR_BASE( 0x223) // Unexpected error occurred while getting a file's size. - #define NE_FLM_TRUNCATING_FILE FTK_ERROR_BASE( 0x224) // Unexpected error occurred while truncating a file. - #define NE_FLM_PARSING_FILE_NAME FTK_ERROR_BASE( 0x225) // Unexpected error occurred while parsing a file's name. - #define NE_FLM_CLOSING_FILE FTK_ERROR_BASE( 0x226) // Unexpected error occurred while closing a file. - #define NE_FLM_GETTING_FILE_INFO FTK_ERROR_BASE( 0x227) // Unexpected error occurred while getting information about a file. - #define NE_FLM_EXPANDING_FILE FTK_ERROR_BASE( 0x228) // Unexpected error occurred while expanding a file. - #define NE_FLM_CHECKING_FILE_EXISTENCE FTK_ERROR_BASE( 0x229) // Unexpected error occurred while checking to see if a file exists. - #define NE_FLM_RENAMING_FILE FTK_ERROR_BASE( 0x22A) // Unexpected error occurred while renaming a file. - #define NE_FLM_SETTING_FILE_INFO FTK_ERROR_BASE( 0x22B) // Unexpected error occurred while setting a file's information. - #define NE_FLM_LAST_IO_ERROR FTK_ERROR_BASE( 0x22C) // NOTE: This is not an error code - do not document - - /**************************************************************************** - Desc: Network Errors - ****************************************************************************/ - - #define NE_FLM_FIRST_NET_ERROR FTK_ERROR_BASE( 0x300) // NOTE: This is not an error code - do not document - #define NE_FLM_NOIP_ADDR FTK_ERROR_BASE( 0x301) // IP address not found - #define NE_FLM_SOCKET_FAIL FTK_ERROR_BASE( 0x302) // IP socket failure - #define NE_FLM_CONNECT_FAIL FTK_ERROR_BASE( 0x303) // TCP/IP connection failure - #define NE_FLM_BIND_FAIL FTK_ERROR_BASE( 0x304) // The TCP/IP services on your system may not be configured or installed. - #define NE_FLM_LISTEN_FAIL FTK_ERROR_BASE( 0x305) // TCP/IP listen failed - #define NE_FLM_ACCEPT_FAIL FTK_ERROR_BASE( 0x306) // TCP/IP accept failed - #define NE_FLM_SELECT_ERR FTK_ERROR_BASE( 0x307) // TCP/IP select failed - #define NE_FLM_SOCKET_SET_OPT_FAIL FTK_ERROR_BASE( 0x308) // TCP/IP socket operation failed - #define NE_FLM_SOCKET_DISCONNECT FTK_ERROR_BASE( 0x309) // TCP/IP disconnected - #define NE_FLM_SOCKET_READ_FAIL FTK_ERROR_BASE( 0x30A) // TCP/IP read failed - #define NE_FLM_SOCKET_WRITE_FAIL FTK_ERROR_BASE( 0x30B) // TCP/IP write failed - #define NE_FLM_SOCKET_READ_TIMEOUT FTK_ERROR_BASE( 0x30C) // TCP/IP read timeout - #define NE_FLM_SOCKET_WRITE_TIMEOUT FTK_ERROR_BASE( 0x30D) // TCP/IP write timeout - #define NE_FLM_SOCKET_ALREADY_CLOSED FTK_ERROR_BASE( 0x30E) // Connection already closed - #define NE_FLM_LAST_NET_ERROR FTK_ERROR_BASE( 0x30F) // NOTE: This is not an error code - do not document - - /**************************************************************************** - Desc: Stream Errors - ****************************************************************************/ - - #define NE_FLM_FIRST_STREAM_ERROR FTK_ERROR_BASE( 0x400) // NOTE: This is not an error code - do not document - #define NE_FLM_STREAM_DECOMPRESS_ERROR FTK_ERROR_BASE( 0x401) // Error decompressing data stream. - #define NE_FLM_STREAM_NOT_COMPRESSED FTK_ERROR_BASE( 0x402) // Attempting to decompress a data stream that is not compressed. - #define NE_FLM_STREAM_TOO_MANY_FILES FTK_ERROR_BASE( 0x403) // Too many files in input stream. - #define NE_FLM_LAST_STREAM_ERROR FTK_ERROR_BASE( 0x404) // NOTE: This is not an error code - do not document + #ifndef RC_BAD + #define RC_BAD( rc) ((rc) != NE_FLM_OK) + #endif + RCODE FLMAPI f_mapPlatformError( + FLMINT iError, + RCODE defaultRc); + #endif // FTK_H diff --git a/ftk/src/ftkerror.cpp b/ftk/src/ftkerror.cpp index f606f3c..3a5c995 100644 --- a/ftk/src/ftkerror.cpp +++ b/ftk/src/ftkerror.cpp @@ -25,152 +25,6 @@ #include "ftksys.h" -#define flmErrorCodeEntry(c) { c, #c } - -typedef struct -{ - RCODE rc; - const char * pszErrorStr; -} F_ERROR_CODE_MAP; - -/**************************************************************************** -Desc: -****************************************************************************/ -F_ERROR_CODE_MAP gv_FtkGeneralErrors[ - NE_FLM_LAST_GENERAL_ERROR - NE_FLM_FIRST_GENERAL_ERROR - 1] = -{ - flmErrorCodeEntry( NE_FLM_NOT_IMPLEMENTED), - flmErrorCodeEntry( NE_FLM_MEM), - flmErrorCodeEntry( NE_FLM_INVALID_PARM), - flmErrorCodeEntry( NE_FLM_TIMEOUT), - flmErrorCodeEntry( NE_FLM_NOT_FOUND), - flmErrorCodeEntry( NE_FLM_EXISTS), - flmErrorCodeEntry( NE_FLM_USER_ABORT), - flmErrorCodeEntry( NE_FLM_FAILURE), - flmErrorCodeEntry( NE_FLM_BOF_HIT), - flmErrorCodeEntry( NE_FLM_EOF_HIT), - flmErrorCodeEntry( NE_FLM_CONV_BAD_DIGIT), - flmErrorCodeEntry( NE_FLM_CONV_DEST_OVERFLOW), - flmErrorCodeEntry( NE_FLM_CONV_ILLEGAL), - flmErrorCodeEntry( NE_FLM_CONV_NULL_SRC), - flmErrorCodeEntry( NE_FLM_CONV_NUM_OVERFLOW), - flmErrorCodeEntry( NE_FLM_CONV_NUM_UNDERFLOW), - flmErrorCodeEntry( NE_FLM_SYNTAX), - flmErrorCodeEntry( NE_FLM_UNSUPPORTED_FEATURE), - flmErrorCodeEntry( NE_FLM_FILE_EXISTS), - flmErrorCodeEntry( NE_FLM_COULD_NOT_CREATE_SEMAPHORE), - flmErrorCodeEntry( NE_FLM_BAD_UTF8), - flmErrorCodeEntry( NE_FLM_ERROR_WAITING_ON_SEMPAHORE), - flmErrorCodeEntry( NE_FLM_BAD_PLATFORM_FORMAT), - flmErrorCodeEntry( NE_FLM_BAD_SEN), - flmErrorCodeEntry( NE_FLM_UNSUPPORTED_INTERFACE), - flmErrorCodeEntry( NE_FLM_BAD_RCODE_TABLE), - flmErrorCodeEntry( NE_FLM_BUFFER_OVERFLOW), - flmErrorCodeEntry( NE_FLM_INVALID_XML), - flmErrorCodeEntry( NE_FLM_ILLEGAL_FLAG), - flmErrorCodeEntry( NE_FLM_ILLEGAL_OP), - flmErrorCodeEntry( NE_FLM_COULD_NOT_START_THREAD), - flmErrorCodeEntry( NE_FLM_BAD_BASE64_ENCODING), - flmErrorCodeEntry( NE_FLM_STREAM_EXISTS), - flmErrorCodeEntry( NE_FLM_MULTIPLE_MATCHES), - flmErrorCodeEntry( NE_FLM_NOT_UNIQUE), - flmErrorCodeEntry( NE_FLM_BTREE_ERROR), - flmErrorCodeEntry( NE_FLM_BTREE_KEY_SIZE), - flmErrorCodeEntry( NE_FLM_BTREE_FULL), - flmErrorCodeEntry( NE_FLM_BTREE_BAD_STATE), - flmErrorCodeEntry( NE_FLM_COULD_NOT_CREATE_MUTEX), - flmErrorCodeEntry( NE_FLM_DATA_ERROR), - flmErrorCodeEntry( NE_FLM_CLASS_NOT_AVAILABLE), - flmErrorCodeEntry( NE_FLM_BAD_DATA_TYPE), - flmErrorCodeEntry( NE_FLM_READ_ONLY), - flmErrorCodeEntry( NE_FLM_KEY_OVERFLOW), - flmErrorCodeEntry( NE_FLM_UNEXPECTED_END_OF_INPUT) -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -F_ERROR_CODE_MAP gv_FtkIoErrors[ - NE_FLM_LAST_IO_ERROR - NE_FLM_FIRST_IO_ERROR - 1] = -{ - flmErrorCodeEntry( NE_FLM_IO_ACCESS_DENIED), - flmErrorCodeEntry( NE_FLM_IO_BAD_FILE_HANDLE), - flmErrorCodeEntry( NE_FLM_IO_COPY_ERR), - flmErrorCodeEntry( NE_FLM_IO_DISK_FULL), - flmErrorCodeEntry( NE_FLM_IO_END_OF_FILE), - flmErrorCodeEntry( NE_FLM_IO_OPEN_ERR), - flmErrorCodeEntry( NE_FLM_IO_SEEK_ERR), - flmErrorCodeEntry( NE_FLM_IO_DIRECTORY_ERR), - flmErrorCodeEntry( NE_FLM_IO_PATH_NOT_FOUND), - flmErrorCodeEntry( NE_FLM_IO_TOO_MANY_OPEN_FILES), - flmErrorCodeEntry( NE_FLM_IO_PATH_TOO_LONG), - flmErrorCodeEntry( NE_FLM_IO_NO_MORE_FILES), - flmErrorCodeEntry( NE_FLM_IO_DELETING_FILE), - flmErrorCodeEntry( NE_FLM_IO_FILE_LOCK_ERR), - flmErrorCodeEntry( NE_FLM_IO_FILE_UNLOCK_ERR), - flmErrorCodeEntry( NE_FLM_IO_PATH_CREATE_FAILURE), - flmErrorCodeEntry( NE_FLM_IO_RENAME_FAILURE), - flmErrorCodeEntry( NE_FLM_IO_INVALID_PASSWORD), - flmErrorCodeEntry( NE_FLM_SETTING_UP_FOR_READ), - flmErrorCodeEntry( NE_FLM_SETTING_UP_FOR_WRITE), - flmErrorCodeEntry( NE_FLM_IO_CANNOT_REDUCE_PATH), - flmErrorCodeEntry( NE_FLM_INITIALIZING_IO_SYSTEM), - flmErrorCodeEntry( NE_FLM_FLUSHING_FILE), - flmErrorCodeEntry( NE_FLM_IO_INVALID_FILENAME), - flmErrorCodeEntry( NE_FLM_IO_CONNECT_ERROR), - flmErrorCodeEntry( NE_FLM_OPENING_FILE), - flmErrorCodeEntry( NE_FLM_DIRECT_OPENING_FILE), - flmErrorCodeEntry( NE_FLM_CREATING_FILE), - flmErrorCodeEntry( NE_FLM_DIRECT_CREATING_FILE), - flmErrorCodeEntry( NE_FLM_READING_FILE), - flmErrorCodeEntry( NE_FLM_DIRECT_READING_FILE), - flmErrorCodeEntry( NE_FLM_WRITING_FILE), - flmErrorCodeEntry( NE_FLM_DIRECT_WRITING_FILE), - flmErrorCodeEntry( NE_FLM_POSITIONING_IN_FILE), - flmErrorCodeEntry( NE_FLM_GETTING_FILE_SIZE), - flmErrorCodeEntry( NE_FLM_TRUNCATING_FILE), - flmErrorCodeEntry( NE_FLM_PARSING_FILE_NAME), - flmErrorCodeEntry( NE_FLM_CLOSING_FILE), - flmErrorCodeEntry( NE_FLM_GETTING_FILE_INFO), - flmErrorCodeEntry( NE_FLM_EXPANDING_FILE), - flmErrorCodeEntry( NE_FLM_CHECKING_FILE_EXISTENCE), - flmErrorCodeEntry( NE_FLM_RENAMING_FILE), - flmErrorCodeEntry( NE_FLM_SETTING_FILE_INFO) -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -F_ERROR_CODE_MAP gv_FtkNetErrors[ - NE_FLM_LAST_NET_ERROR - NE_FLM_FIRST_NET_ERROR - 1] = -{ - flmErrorCodeEntry( NE_FLM_NOIP_ADDR), - flmErrorCodeEntry( NE_FLM_SOCKET_FAIL), - flmErrorCodeEntry( NE_FLM_CONNECT_FAIL), - flmErrorCodeEntry( NE_FLM_BIND_FAIL), - flmErrorCodeEntry( NE_FLM_LISTEN_FAIL), - flmErrorCodeEntry( NE_FLM_ACCEPT_FAIL), - flmErrorCodeEntry( NE_FLM_SELECT_ERR), - flmErrorCodeEntry( NE_FLM_SOCKET_SET_OPT_FAIL), - flmErrorCodeEntry( NE_FLM_SOCKET_DISCONNECT), - flmErrorCodeEntry( NE_FLM_SOCKET_READ_FAIL), - flmErrorCodeEntry( NE_FLM_SOCKET_WRITE_FAIL), - flmErrorCodeEntry( NE_FLM_SOCKET_READ_TIMEOUT), - flmErrorCodeEntry( NE_FLM_SOCKET_WRITE_TIMEOUT), - flmErrorCodeEntry( NE_FLM_SOCKET_ALREADY_CLOSED) -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -F_ERROR_CODE_MAP gv_FtkStreamErrors[ - NE_FLM_LAST_STREAM_ERROR - NE_FLM_FIRST_STREAM_ERROR - 1] = -{ - flmErrorCodeEntry( NE_FLM_STREAM_DECOMPRESS_ERROR), - flmErrorCodeEntry( NE_FLM_STREAM_NOT_COMPRESSED), - flmErrorCodeEntry( NE_FLM_STREAM_TOO_MANY_FILES) -}; - /**************************************************************************** Desc: The primary purpose of this function is to provide a way to easily trap errors when they occur. Just put a breakpoint in this function @@ -188,50 +42,6 @@ RCODE FLMAPI f_makeErr( return( NE_FLM_OK); } - // Switch on warning type return codes - - if( rc <= NE_FLM_NOT_FOUND) - { - switch(rc) - { - case NE_FLM_BOF_HIT: - break; - case NE_FLM_EOF_HIT: - break; - case NE_FLM_EXISTS: - break; - case NE_FLM_NOT_FOUND: - break; - } - - goto Exit; - } - - // Switch on errors - - switch( rc) - { - case NE_FLM_IO_BAD_FILE_HANDLE: - break; - case NE_FLM_MEM: - break; - case NE_FLM_SYNTAX: - break; - case NE_FLM_NOT_IMPLEMENTED: - break; - case NE_FLM_CONV_DEST_OVERFLOW: - break; - case NE_FLM_FAILURE: - break; - case NE_FLM_ILLEGAL_OP: - break; - default: - rc = rc; - break; - } - -Exit: - #if defined( FLM_DEBUG) if( bAssert) { @@ -245,51 +55,6 @@ Exit: } #endif -/**************************************************************************** -Desc: Returns a pointer to the ASCII string representation - of a return code. -****************************************************************************/ -const char * FLMAPI f_errorString( - RCODE rc) -{ - const char * pszErrorStr; - - if( rc == NE_FLM_OK) - { - pszErrorStr = "NE_FLM_OK"; - } - else if( rc > NE_FLM_FIRST_GENERAL_ERROR && - rc < NE_FLM_LAST_GENERAL_ERROR) - { - pszErrorStr = gv_FtkGeneralErrors[ - rc - NE_FLM_FIRST_GENERAL_ERROR - 1].pszErrorStr; - } - else if( rc > NE_FLM_FIRST_IO_ERROR && - rc < NE_FLM_LAST_IO_ERROR) - { - pszErrorStr = gv_FtkIoErrors[ - rc - NE_FLM_FIRST_IO_ERROR - 1].pszErrorStr; - } - else if( rc > NE_FLM_FIRST_NET_ERROR && - rc < NE_FLM_LAST_NET_ERROR) - { - pszErrorStr = gv_FtkNetErrors[ - rc - NE_FLM_FIRST_NET_ERROR - 1].pszErrorStr; - } - else if( rc > NE_FLM_FIRST_STREAM_ERROR && - rc < NE_FLM_LAST_STREAM_ERROR) - { - pszErrorStr = gv_FtkStreamErrors[ - rc - NE_FLM_FIRST_STREAM_ERROR - 1].pszErrorStr; - } - else - { - pszErrorStr = "Unknown error"; - } - - return( pszErrorStr); -} - /*************************************************************************** Desc: Map POSIX errno to Flaim IO errors. ***************************************************************************/ @@ -446,67 +211,6 @@ RCODE FLMAPI f_mapPlatformError( } #endif -/**************************************************************************** -Desc: Checks the error code mapping tables on startup -****************************************************************************/ -RCODE f_checkErrorCodeTables( void) -{ - RCODE rc = NE_FLM_OK; - FLMUINT uiLoop; - - for( uiLoop = 0; - uiLoop < (NE_FLM_LAST_GENERAL_ERROR - NE_FLM_FIRST_GENERAL_ERROR - 1); - uiLoop++) - { - if( gv_FtkGeneralErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_FLM_FIRST_GENERAL_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_FLM_BAD_RCODE_TABLE); - goto Exit; - } - } - - for( uiLoop = 0; - uiLoop < (NE_FLM_LAST_IO_ERROR - NE_FLM_FIRST_IO_ERROR - 1); - uiLoop++) - { - if( gv_FtkIoErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_FLM_FIRST_IO_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_FLM_BAD_RCODE_TABLE); - goto Exit; - } - } - - for( uiLoop = 0; - uiLoop < (NE_FLM_LAST_NET_ERROR - NE_FLM_FIRST_NET_ERROR - 1); - uiLoop++) - { - if( gv_FtkNetErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_FLM_FIRST_NET_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_FLM_BAD_RCODE_TABLE); - goto Exit; - } - } - - for( uiLoop = 0; - uiLoop < (NE_FLM_LAST_STREAM_ERROR - NE_FLM_FIRST_STREAM_ERROR - 1); - uiLoop++) - { - if( gv_FtkStreamErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_FLM_FIRST_STREAM_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_FLM_BAD_RCODE_TABLE); - goto Exit; - } - } - -Exit: - - return( rc); -} - /**************************************************************************** Desc: ****************************************************************************/ diff --git a/ftk/src/ftkmisc.cpp b/ftk/src/ftkmisc.cpp index 3985057..7a63167 100644 --- a/ftk/src/ftkmisc.cpp +++ b/ftk/src/ftkmisc.cpp @@ -141,11 +141,6 @@ RCODE FLMAPI ftkStartup( void) goto Exit; } - if( RC_BAD( rc = f_checkErrorCodeTables())) - { - goto Exit; - } - #ifdef FLM_DEBUG if( RC_BAD( rc = f_verifyMetaphoneRoutines())) { diff --git a/ftk/src/ftkprntf.cpp b/ftk/src/ftkprntf.cpp index f2c72b5..b47c013 100644 --- a/ftk/src/ftkprntf.cpp +++ b/ftk/src/ftkprntf.cpp @@ -705,14 +705,13 @@ void f_sprintfErrorFormatter( if( ucFormatChar == 'e') { pInfo->pszDestStr += - f_sprintf( (char *)pInfo->pszDestStr, "%s (%04X)", - (char *)f_errorString( (RCODE)uiErrorCode), + f_sprintf( (char *)pInfo->pszDestStr, "0x%04X", (unsigned)uiErrorCode); } else { pInfo->pszDestStr += - f_sprintf( (char *)pInfo->pszDestStr, "%04X", + f_sprintf( (char *)pInfo->pszDestStr, "0x%04X", (unsigned)uiErrorCode); } } diff --git a/ftk/src/ftksys.h b/ftk/src/ftksys.h index 176a884..7cb82af 100644 --- a/ftk/src/ftksys.h +++ b/ftk/src/ftksys.h @@ -2152,8 +2152,6 @@ void f_memoryCleanup( void); - RCODE f_checkErrorCodeTables( void); - RCODE f_allocFileSystem( IF_FileSystem ** ppFileSystem); diff --git a/xflaim/sample/sample.cpp b/xflaim/sample/sample.cpp index 66e7b32..f7f2d2c 100644 --- a/xflaim/sample/sample.cpp +++ b/xflaim/sample/sample.cpp @@ -840,9 +840,8 @@ Exit: if( RC_BAD( rc)) { - sprintf( (char *)ucMsgBuf, "Error %04X -- %s\n", - (unsigned)rc, - (char *)pDbSystem->errorString( rc)); + sprintf( (char *)ucMsgBuf, "Error 0x%04X\n", + (unsigned)rc); printMessage( (char *)ucMsgBuf); } diff --git a/xflaim/src/fdom.cpp b/xflaim/src/fdom.cpp index fe14ba7..a23b3e2 100644 --- a/xflaim/src/fdom.cpp +++ b/xflaim/src/fdom.cpp @@ -13236,16 +13236,16 @@ FLMUINT FLMAPI F_DOMNode::compareNode( if( RC_BAD( rc = pLeftNode->getUnicode( pDb1, &puzVal1))) { - f_sprintf( szBuffer, "getUnicode failed with rc==(%u)%s.", - rc, F_DbSystem::_errorString( rc)); + f_sprintf( szBuffer, "getUnicode failed with rc==0x%04X.", + (unsigned)rc); uiEqual = NODE_NOT_EQUAL; goto Exit; } if( RC_BAD( rc = pRightNode->getUnicode( pDb2, &puzVal2))) { - f_sprintf( szBuffer, "getUnicode failed with rc==(%u)%s.", - rc, F_DbSystem::_errorString( rc)); + f_sprintf( szBuffer, "getUnicode failed with rc==0x%04X.", + (unsigned)rc); uiEqual = NODE_NOT_EQUAL; goto Exit; } @@ -13264,16 +13264,16 @@ FLMUINT FLMAPI F_DOMNode::compareNode( { if( RC_BAD( rc = pLeftNode->getUINT64( pDb1, &ui64Tmp1))) { - f_sprintf( szBuffer, "getUINT64 failed with rc==(%u)%s.", - rc, F_DbSystem::_errorString( rc)); + f_sprintf( szBuffer, "getUINT64 failed with rc==0x%04X.", + (unsigned)rc); uiEqual = NODE_NOT_EQUAL; goto Exit; } if( RC_BAD( rc = pRightNode->getUINT64( pDb2, &ui64Tmp2))) { - f_sprintf( szBuffer, "getUINT64 failed with rc==(%u)%s.", - rc, F_DbSystem::_errorString( rc)); + f_sprintf( szBuffer, "getUINT64 failed with rc==0x%04X.", + (unsigned)rc); uiEqual = NODE_NOT_EQUAL; goto Exit; } @@ -13303,8 +13303,8 @@ FLMUINT FLMAPI F_DOMNode::compareNode( if( RC_BAD( rc = pLeftNode->getBinary( pDb1, pucBinary1, 0, uiDataLen1, &uiBytesReturned1))) { - f_sprintf( szBuffer, "getBinary failed with rc==(%u)%s.", - rc, F_DbSystem::_errorString( rc)); + f_sprintf( szBuffer, "getBinary failed with rc==0x%04X.", + (unsigned)rc); uiEqual = NODE_NOT_EQUAL; goto Exit; } @@ -13312,8 +13312,8 @@ FLMUINT FLMAPI F_DOMNode::compareNode( if( RC_BAD( rc = pRightNode->getBinary( pDb2, pucBinary2, 0, uiDataLen2, &uiBytesReturned2))) { - f_sprintf( szBuffer, "getBinary failed with rc==(%u)%s.", - rc, F_DbSystem::_errorString( rc)); + f_sprintf( szBuffer, "getBinary failed with rc==0x%04X.", + (unsigned)rc); uiEqual = NODE_NOT_EQUAL; goto Exit; } diff --git a/xflaim/src/flaimsys.h b/xflaim/src/flaimsys.h index 3a7bd8b..3f5de41 100644 --- a/xflaim/src/flaimsys.h +++ b/xflaim/src/flaimsys.h @@ -5039,20 +5039,9 @@ public: return( dbSystem.errorIsFileCorrupt( rc)); } - const char * FLMAPI errorString( - RCODE rc); - const char * FLMAPI checkErrorToStr( FLMINT iCheckErrorCode); - static const char * _errorString( - RCODE rc) - { - F_DbSystem dbSystem; - - return( dbSystem.errorString( rc)); - } - RCODE FLMAPI openBufferIStream( const char * pucBuffer, FLMUINT uiLength, @@ -5269,8 +5258,6 @@ private: void initFastBlockCheckSum( void); - RCODE checkErrorCodeTables( void); - RCODE allocDb( F_Db ** ppDb, FLMBOOL bInternalOpen); diff --git a/xflaim/src/flerror.cpp b/xflaim/src/flerror.cpp index 53eb9ef..332cecd 100644 --- a/xflaim/src/flerror.cpp +++ b/xflaim/src/flerror.cpp @@ -25,252 +25,6 @@ #include "flaimsys.h" -/**************************************************************************** -Desc: Error code to string mapping tables -****************************************************************************/ -typedef struct -{ - RCODE rc; - const char * pszErrorStr; -} F_ERROR_CODE_MAP; - -#define flmErrorCodeEntry(c) { c, #c } - -/**************************************************************************** -Desc: -****************************************************************************/ -F_ERROR_CODE_MAP gv_FlmGeneralErrors[ - NE_XFLM_LAST_GENERAL_ERROR - NE_XFLM_FIRST_GENERAL_ERROR - 1] = -{ - flmErrorCodeEntry( NE_XFLM_BAD_PREFIX), - flmErrorCodeEntry( NE_XFLM_ATTRIBUTE_PURGED), - flmErrorCodeEntry( NE_XFLM_BAD_COLLECTION), - flmErrorCodeEntry( NE_XFLM_DATABASE_LOCK_REQ_TIMEOUT), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_DATA_COMPONENT), - flmErrorCodeEntry( NE_XFLM_MUST_INDEX_ON_PRESENCE), - flmErrorCodeEntry( NE_XFLM_BAD_IX), - flmErrorCodeEntry( NE_XFLM_BACKUP_ACTIVE), - flmErrorCodeEntry( NE_XFLM_SERIAL_NUM_MISMATCH), - flmErrorCodeEntry( NE_XFLM_BAD_RFL_DB_SERIAL_NUM), - flmErrorCodeEntry( NE_XFLM_BAD_RFL_FILE_NUMBER), - flmErrorCodeEntry( NE_XFLM_CANNOT_DEL_ELEMENT), - flmErrorCodeEntry( NE_XFLM_CANNOT_MOD_DATA_TYPE), - flmErrorCodeEntry( NE_XFLM_CANNOT_INDEX_DATA_TYPE), - flmErrorCodeEntry( NE_XFLM_BAD_ELEMENT_NUM), - flmErrorCodeEntry( NE_XFLM_BAD_ATTRIBUTE_NUM), - flmErrorCodeEntry( NE_XFLM_BAD_ENCDEF_NUM), - flmErrorCodeEntry( NE_XFLM_INVALID_FILE_SEQUENCE), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_ELEMENT_NUM), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_TRANS_TYPE), - flmErrorCodeEntry( NE_XFLM_UNSUPPORTED_VERSION), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_TRANS_OP), - flmErrorCodeEntry( NE_XFLM_INCOMPLETE_LOG), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_INDEX_DEF), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_INDEX_ON), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_STATE_CHANGE), - flmErrorCodeEntry( NE_XFLM_BAD_RFL_SERIAL_NUM), - flmErrorCodeEntry( NE_XFLM_NEWER_FLAIM), - flmErrorCodeEntry( NE_XFLM_CANNOT_MOD_ELEMENT_STATE), - flmErrorCodeEntry( NE_XFLM_CANNOT_MOD_ATTRIBUTE_STATE), - flmErrorCodeEntry( NE_XFLM_NO_MORE_ELEMENT_NUMS), - flmErrorCodeEntry( NE_XFLM_NO_TRANS_ACTIVE), - flmErrorCodeEntry( NE_XFLM_NOT_FLAIM), - flmErrorCodeEntry( NE_XFLM_OLD_VIEW), - flmErrorCodeEntry( NE_XFLM_SHARED_LOCK), - flmErrorCodeEntry( NE_XFLM_TRANS_ACTIVE), - flmErrorCodeEntry( NE_XFLM_RFL_TRANS_GAP), - flmErrorCodeEntry( NE_XFLM_BAD_COLLATED_KEY), - flmErrorCodeEntry( NE_XFLM_MUST_DELETE_INDEXES), - flmErrorCodeEntry( NE_XFLM_RFL_INCOMPLETE), - flmErrorCodeEntry( NE_XFLM_CANNOT_RESTORE_RFL_FILES), - flmErrorCodeEntry( NE_XFLM_INCONSISTENT_BACKUP), - flmErrorCodeEntry( NE_XFLM_BLOCK_CRC), - flmErrorCodeEntry( NE_XFLM_ABORT_TRANS), - flmErrorCodeEntry( NE_XFLM_NOT_RFL), - flmErrorCodeEntry( NE_XFLM_BAD_RFL_PACKET), - flmErrorCodeEntry( NE_XFLM_DATA_PATH_MISMATCH), - flmErrorCodeEntry( NE_XFLM_MUST_CLOSE_DATABASE), - flmErrorCodeEntry( NE_XFLM_INVALID_ENCKEY_CRC), - flmErrorCodeEntry( NE_XFLM_HDR_CRC), - flmErrorCodeEntry( NE_XFLM_NO_NAME_TABLE), - flmErrorCodeEntry( NE_XFLM_UNALLOWED_UPGRADE), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_ATTRIBUTE_NUM), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_INDEX_NUM), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_COLLECTION_NUM), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_ELEMENT_NAME), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_ATTRIBUTE_NAME), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_INDEX_NAME), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_COLLECTION_NAME), - flmErrorCodeEntry( NE_XFLM_ELEMENT_PURGED), - flmErrorCodeEntry( NE_XFLM_TOO_MANY_OPEN_DATABASES), - flmErrorCodeEntry( NE_XFLM_DATABASE_OPEN), - flmErrorCodeEntry( NE_XFLM_CACHE_ERROR), - flmErrorCodeEntry( NE_XFLM_DB_FULL), - flmErrorCodeEntry( NE_XFLM_QUERY_SYNTAX), - flmErrorCodeEntry( NE_XFLM_INDEX_OFFLINE), - flmErrorCodeEntry( NE_XFLM_RFL_DISK_FULL), - flmErrorCodeEntry( NE_XFLM_MUST_WAIT_CHECKPOINT), - flmErrorCodeEntry( NE_XFLM_MISSING_ENC_ALGORITHM), - flmErrorCodeEntry( NE_XFLM_INVALID_ENC_ALGORITHM), - flmErrorCodeEntry( NE_XFLM_INVALID_ENC_KEY_SIZE), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_DATA_TYPE), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_STATE), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_ELEMENT_NAME), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_ATTRIBUTE_NAME), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_COLLECTION_NAME), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_INDEX_NAME), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_ELEMENT_NUMBER), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_ATTRIBUTE_NUMBER), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_COLLECTION_NUMBER), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_INDEX_NUMBER), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_ENCDEF_NUMBER), - flmErrorCodeEntry( NE_XFLM_COLLECTION_NAME_MISMATCH), - flmErrorCodeEntry( NE_XFLM_ELEMENT_NAME_MISMATCH), - flmErrorCodeEntry( NE_XFLM_ATTRIBUTE_NAME_MISMATCH), - flmErrorCodeEntry( NE_XFLM_INVALID_COMPARE_RULE), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_KEY_COMPONENT), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_DATA_COMPONENT), - flmErrorCodeEntry( NE_XFLM_MISSING_KEY_COMPONENT), - flmErrorCodeEntry( NE_XFLM_MISSING_DATA_COMPONENT), - flmErrorCodeEntry( NE_XFLM_INVALID_INDEX_OPTION), - flmErrorCodeEntry( NE_XFLM_NO_MORE_ATTRIBUTE_NUMS), - flmErrorCodeEntry( NE_XFLM_MISSING_ELEMENT_NAME), - flmErrorCodeEntry( NE_XFLM_MISSING_ATTRIBUTE_NAME), - flmErrorCodeEntry( NE_XFLM_MISSING_ELEMENT_NUMBER), - flmErrorCodeEntry( NE_XFLM_MISSING_ATTRIBUTE_NUMBER), - flmErrorCodeEntry( NE_XFLM_MISSING_INDEX_NAME), - flmErrorCodeEntry( NE_XFLM_MISSING_INDEX_NUMBER), - flmErrorCodeEntry( NE_XFLM_MISSING_COLLECTION_NAME), - flmErrorCodeEntry( NE_XFLM_MISSING_COLLECTION_NUMBER), - flmErrorCodeEntry( NE_XFLM_MISSING_ENCDEF_NAME), - flmErrorCodeEntry( NE_XFLM_MISSING_ENCDEF_NUMBER), - flmErrorCodeEntry( NE_XFLM_NO_MORE_INDEX_NUMS), - flmErrorCodeEntry( NE_XFLM_NO_MORE_COLLECTION_NUMS), - flmErrorCodeEntry( NE_XFLM_CANNOT_DEL_ATTRIBUTE), - flmErrorCodeEntry( NE_XFLM_TOO_MANY_PENDING_NODES), - flmErrorCodeEntry( NE_XFLM_BAD_USE_OF_ELM_ROOT_TAG), - flmErrorCodeEntry( NE_XFLM_DUP_SIBLING_IX_COMPONENTS), - flmErrorCodeEntry( NE_XFLM_RFL_FILE_NOT_FOUND), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_KEY_COMPONENT_NUM), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_DATA_COMPONENT_NUM), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_PREFIX_NUMBER), - flmErrorCodeEntry( NE_XFLM_MISSING_PREFIX_NAME), - flmErrorCodeEntry( NE_XFLM_MISSING_PREFIX_NUMBER), - flmErrorCodeEntry( NE_XFLM_UNDEFINED_ELEMENT_NAME), - flmErrorCodeEntry( NE_XFLM_UNDEFINED_ATTRIBUTE_NAME), - flmErrorCodeEntry( NE_XFLM_DUPLICATE_PREFIX_NAME), - flmErrorCodeEntry( NE_XFLM_NAMESPACE_NOT_ALLOWED), - flmErrorCodeEntry( NE_XFLM_INVALID_NAMESPACE_DECL), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_NAMESPACE_DECL_DATATYPE), - flmErrorCodeEntry( NE_XFLM_NO_MORE_PREFIX_NUMS), - flmErrorCodeEntry( NE_XFLM_NO_MORE_ENCDEF_NUMS), - flmErrorCodeEntry( NE_XFLM_COLLECTION_OFFLINE), - flmErrorCodeEntry( NE_XFLM_DELETE_NOT_ALLOWED), - flmErrorCodeEntry( NE_XFLM_RESET_NEEDED), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_REQUIRED_VALUE), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_INDEX_COMPONENT), - flmErrorCodeEntry( NE_XFLM_ILLEGAL_UNIQUE_SUB_ELEMENT_VALUE), - flmErrorCodeEntry( NE_XFLM_DATA_TYPE_MUST_BE_NO_DATA), - flmErrorCodeEntry( NE_XFLM_CANNOT_SET_REQUIRED), - flmErrorCodeEntry( NE_XFLM_CANNOT_SET_LIMIT), - flmErrorCodeEntry( NE_XFLM_CANNOT_SET_INDEX_ON), - flmErrorCodeEntry( NE_XFLM_CANNOT_SET_COMPARE_RULES), - flmErrorCodeEntry( NE_XFLM_INPUT_PENDING), - flmErrorCodeEntry( NE_XFLM_INVALID_NODE_TYPE), - flmErrorCodeEntry( NE_XFLM_INVALID_CHILD_ELM_NODE_ID), - flmErrorCodeEntry( NE_XFLM_RFL_END) -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -F_ERROR_CODE_MAP gv_FlmDomErrors[ - NE_XFLM_LAST_DOM_ERROR - NE_XFLM_FIRST_DOM_ERROR - 1] = -{ - flmErrorCodeEntry( NE_XFLM_DOM_HIERARCHY_REQUEST_ERR), - flmErrorCodeEntry( NE_XFLM_DOM_WRONG_DOCUMENT_ERR), - flmErrorCodeEntry( NE_XFLM_DOM_DATA_ERROR), - flmErrorCodeEntry( NE_XFLM_DOM_NODE_NOT_FOUND), - flmErrorCodeEntry( NE_XFLM_DOM_INVALID_CHILD_TYPE), - flmErrorCodeEntry( NE_XFLM_DOM_NODE_DELETED), - flmErrorCodeEntry( NE_XFLM_DOM_DUPLICATE_ELEMENT) -}; - -/**************************************************************************** -Desc: -****************************************************************************/ -F_ERROR_CODE_MAP gv_FlmQueryErrors[ - NE_XFLM_LAST_QUERY_ERROR - NE_XFLM_FIRST_QUERY_ERROR - 1] = -{ - flmErrorCodeEntry( NE_XFLM_Q_UNMATCHED_RPAREN), - flmErrorCodeEntry( NE_XFLM_Q_UNEXPECTED_LPAREN), - flmErrorCodeEntry( NE_XFLM_Q_UNEXPECTED_RPAREN), - flmErrorCodeEntry( NE_XFLM_Q_EXPECTING_OPERAND), - flmErrorCodeEntry( NE_XFLM_Q_EXPECTING_OPERATOR), - flmErrorCodeEntry( NE_XFLM_Q_UNEXPECTED_COMMA), - flmErrorCodeEntry( NE_XFLM_Q_EXPECTING_LPAREN), - flmErrorCodeEntry( NE_XFLM_Q_UNEXPECTED_VALUE), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_NUM_FUNC_ARGS), - flmErrorCodeEntry( NE_XFLM_Q_UNEXPECTED_XPATH_COMPONENT), - flmErrorCodeEntry( NE_XFLM_Q_ILLEGAL_LBRACKET), - flmErrorCodeEntry( NE_XFLM_Q_ILLEGAL_RBRACKET), - flmErrorCodeEntry( NE_XFLM_Q_ILLEGAL_OPERAND), - flmErrorCodeEntry( NE_XFLM_Q_ALREADY_OPTIMIZED), - flmErrorCodeEntry( NE_XFLM_Q_MISMATCHED_DB), - flmErrorCodeEntry( NE_XFLM_Q_ILLEGAL_OPERATOR), - flmErrorCodeEntry( NE_XFLM_Q_ILLEGAL_COMPARE_RULES), - flmErrorCodeEntry( NE_XFLM_Q_INCOMPLETE_QUERY_EXPR), - flmErrorCodeEntry( NE_XFLM_Q_NOT_POSITIONED), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_NODE_ID_VALUE), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_META_DATA_TYPE), - flmErrorCodeEntry( NE_XFLM_Q_NEW_EXPR_NOT_ALLOWED), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_CONTEXT_POS), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_FUNC_ARG), - flmErrorCodeEntry( NE_XFLM_Q_EXPECTING_RPAREN), - flmErrorCodeEntry( NE_XFLM_Q_TOO_LATE_TO_ADD_SORT_KEYS), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_SORT_KEY_COMPONENT), - flmErrorCodeEntry( NE_XFLM_Q_DUPLICATE_SORT_KEY_COMPONENT), - flmErrorCodeEntry( NE_XFLM_Q_MISSING_SORT_KEY_COMPONENT), - flmErrorCodeEntry( NE_XFLM_Q_NO_SORT_KEY_COMPONENTS_SPECIFIED), - flmErrorCodeEntry( NE_XFLM_Q_SORT_KEY_CONTEXT_MUST_BE_ELEMENT), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_ELEMENT_NUM_IN_SORT_KEYS), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_ATTR_NUM_IN_SORT_KEYS), - flmErrorCodeEntry( NE_XFLM_Q_NON_POSITIONABLE_QUERY), - flmErrorCodeEntry( NE_XFLM_Q_INVALID_POSITION) -}; - -F_ERROR_CODE_MAP gv_FlmNiciErrors[ - NE_XFLM_LAST_NICI_ERROR - NE_XFLM_FIRST_NICI_ERROR - 1] = -{ - flmErrorCodeEntry( NE_XFLM_NICI_CONTEXT), - flmErrorCodeEntry( NE_XFLM_NICI_ATTRIBUTE_VALUE), - flmErrorCodeEntry( NE_XFLM_NICI_BAD_ATTRIBUTE), - flmErrorCodeEntry( NE_XFLM_NICI_WRAPKEY_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_UNWRAPKEY_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_INVALID_ALGORITHM), - flmErrorCodeEntry( NE_XFLM_NICI_GENKEY_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_BAD_RANDOM), - flmErrorCodeEntry( NE_XFLM_PBE_ENCRYPT_FAILED), - flmErrorCodeEntry( NE_XFLM_PBE_DECRYPT_FAILED), - flmErrorCodeEntry( NE_XFLM_DIGEST_INIT_FAILED), - flmErrorCodeEntry( NE_XFLM_DIGEST_FAILED), - flmErrorCodeEntry( NE_XFLM_INJECT_KEY_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_FIND_INIT), - flmErrorCodeEntry( NE_XFLM_NICI_FIND_OBJECT), - flmErrorCodeEntry( NE_XFLM_NICI_KEY_NOT_FOUND), - flmErrorCodeEntry( NE_XFLM_NICI_ENC_INIT_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_ENCRYPT_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_DECRYPT_INIT_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_DECRYPT_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_WRAPKEY_NOT_FOUND), - flmErrorCodeEntry( NE_XFLM_NOT_EXPECTING_PASSWORD), - flmErrorCodeEntry( NE_XFLM_EXPECTING_PASSWORD), - flmErrorCodeEntry( NE_XFLM_EXTRACT_KEY_FAILED), - flmErrorCodeEntry( NE_XFLM_NICI_INIT_FAILED), - flmErrorCodeEntry( NE_XFLM_BAD_ENCKEY_SIZE), - flmErrorCodeEntry( NE_XFLM_ENCRYPTION_UNAVAILABLE) -}; - /**************************************************************************** Desc: ****************************************************************************/ @@ -512,112 +266,3 @@ const char * FLMAPI F_DbSystem::checkErrorToStr( } } -/**************************************************************************** -Desc: Returns a pointer to the ASCII string representation - of a return code. -****************************************************************************/ -const char * F_DbSystem::errorString( - RCODE rc) -{ - const char * pszErrorStr; - - if( rc == NE_XFLM_OK) - { - pszErrorStr = "NE_XFLM_OK"; - } - else if( f_isToolkitError( rc)) - { - pszErrorStr = f_errorString( rc); - } - else if( rc > NE_XFLM_FIRST_GENERAL_ERROR && - rc < NE_XFLM_LAST_GENERAL_ERROR) - { - pszErrorStr = gv_FlmGeneralErrors[ - rc - NE_XFLM_FIRST_GENERAL_ERROR - 1].pszErrorStr; - } - else if( rc > NE_XFLM_FIRST_DOM_ERROR && - rc < NE_XFLM_LAST_DOM_ERROR) - { - pszErrorStr = gv_FlmDomErrors[ - rc - NE_XFLM_FIRST_DOM_ERROR - 1].pszErrorStr; - } - else if( rc > NE_XFLM_FIRST_QUERY_ERROR && - rc < NE_XFLM_LAST_QUERY_ERROR) - { - pszErrorStr = gv_FlmQueryErrors[ - rc - NE_XFLM_FIRST_QUERY_ERROR - 1].pszErrorStr; - } - else if( rc > NE_XFLM_FIRST_NICI_ERROR && - rc < NE_XFLM_LAST_NICI_ERROR) - { - pszErrorStr = gv_FlmNiciErrors[ - rc - NE_XFLM_FIRST_NICI_ERROR - 1].pszErrorStr; - } - else - { - pszErrorStr = "Unknown error"; - } - - return( pszErrorStr); -} - -/**************************************************************************** -Desc: Checks the error code mapping tables on startup -****************************************************************************/ -RCODE F_DbSystem::checkErrorCodeTables( void) -{ - RCODE rc = NE_XFLM_OK; - FLMUINT uiLoop; - - for( uiLoop = 0; - uiLoop < (NE_XFLM_LAST_GENERAL_ERROR - NE_XFLM_FIRST_GENERAL_ERROR - 1); - uiLoop++) - { - if( gv_FlmGeneralErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_XFLM_FIRST_GENERAL_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_XFLM_BAD_RCODE_TABLE); - goto Exit; - } - } - - for( uiLoop = 0; - uiLoop < (NE_XFLM_LAST_DOM_ERROR - NE_XFLM_FIRST_DOM_ERROR - 1); - uiLoop++) - { - if( gv_FlmDomErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_XFLM_FIRST_DOM_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_XFLM_BAD_RCODE_TABLE); - goto Exit; - } - } - - for( uiLoop = 0; - uiLoop < (NE_XFLM_LAST_QUERY_ERROR - NE_XFLM_FIRST_QUERY_ERROR - 1); - uiLoop++) - { - if( gv_FlmQueryErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_XFLM_FIRST_QUERY_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_XFLM_BAD_RCODE_TABLE); - goto Exit; - } - } - - for( uiLoop = 0; - uiLoop < (NE_XFLM_LAST_NICI_ERROR - NE_XFLM_FIRST_NICI_ERROR - 1); - uiLoop++) - { - if( gv_FlmNiciErrors[ uiLoop].rc != - (RCODE)(uiLoop + NE_XFLM_FIRST_NICI_ERROR + 1)) - { - rc = RC_SET_AND_ASSERT( NE_XFLM_BAD_RCODE_TABLE); - goto Exit; - } - } - -Exit: - - return( rc); -} diff --git a/xflaim/src/fsysdata.cpp b/xflaim/src/fsysdata.cpp index 7c6dfb5..bb78c05 100644 --- a/xflaim/src/fsysdata.cpp +++ b/xflaim/src/fsysdata.cpp @@ -1888,13 +1888,6 @@ RCODE F_DbSystem::init( void) goto Exit; } - // Check the error code tables - - if( RC_BAD( rc = checkErrorCodeTables())) - { - goto Exit; - } - // Initialize all of the fields gv_XFlmSysData.uiMaxUnusedTime = FLM_SECS_TO_TIMER_UNITS( diff --git a/xflaim/src/xflaim.h b/xflaim/src/xflaim.h index 7de3e30..6be4582 100644 --- a/xflaim/src/xflaim.h +++ b/xflaim/src/xflaim.h @@ -1649,18 +1649,6 @@ IF_Db * pDb, IF_Db ** ppDb) = 0; - /** - * @brief Converts an RCODE error number to a string equivalent. - * - * This method converts an RCODE error number to a string equivalent that can then be printed in - * a diagnostic log or some other human readable output. - * - * @param rc The RCODE to be translated. - * @return const char * - */ - virtual const char * FLMAPI errorString( - RCODE rc) = 0; - /** * @brief Converts a corruption code to a string equivalent. * @@ -4554,38 +4542,20 @@ Desc: Status and return codes ****************************************************************************/ - #define XFLM_ERROR_BASE(e) ((RCODE)((int)(0x81050000+(e)))) - #define NE_XFLM_NOT_IMPLEMENTED NE_FLM_NOT_IMPLEMENTED #define NE_XFLM_MEM NE_FLM_MEM #define NE_XFLM_INVALID_PARM NE_FLM_INVALID_PARM - #define NE_XFLM_TIMEOUT NE_FLM_TIMEOUT #define NE_XFLM_NOT_FOUND NE_FLM_NOT_FOUND #define NE_XFLM_EXISTS NE_FLM_EXISTS - #define NE_XFLM_USER_ABORT NE_FLM_USER_ABORT #define NE_XFLM_FAILURE NE_FLM_FAILURE #define NE_XFLM_BOF_HIT NE_FLM_BOF_HIT #define NE_XFLM_EOF_HIT NE_FLM_EOF_HIT - #define NE_XFLM_CONV_BAD_DIGIT NE_FLM_CONV_BAD_DIGIT #define NE_XFLM_CONV_DEST_OVERFLOW NE_FLM_CONV_DEST_OVERFLOW #define NE_XFLM_CONV_ILLEGAL NE_FLM_CONV_ILLEGAL - #define NE_XFLM_CONV_NULL_SRC NE_FLM_CONV_NULL_SRC #define NE_XFLM_CONV_NUM_OVERFLOW NE_FLM_CONV_NUM_OVERFLOW - #define NE_XFLM_CONV_NUM_UNDERFLOW NE_FLM_CONV_NUM_UNDERFLOW #define NE_XFLM_SYNTAX NE_FLM_SYNTAX - #define NE_XFLM_UNSUPPORTED_FEATURE NE_FLM_UNSUPPORTED_FEATURE - #define NE_XFLM_FILE_EXISTS NE_FLM_FILE_EXISTS - #define NE_XFLM_COULD_NOT_CREATE_SEMAPHORE NE_FLM_COULD_NOT_CREATE_SEMAPHORE - #define NE_XFLM_BAD_UTF8 NE_FLM_BAD_UTF8 - #define NE_XFLM_ERROR_WAITING_ON_SEMPAHORE NE_FLM_ERROR_WAITING_ON_SEMPAHORE - #define NE_XFLM_BAD_PLATFORM_FORMAT NE_FLM_BAD_PLATFORM_FORMAT - #define NE_XFLM_BAD_SEN NE_FLM_BAD_SEN - #define NE_XFLM_UNSUPPORTED_INTERFACE NE_FLM_UNSUPPORTED_INTERFACE - #define NE_XFLM_BAD_RCODE_TABLE NE_FLM_BAD_RCODE_TABLE - #define NE_XFLM_BUFFER_OVERFLOW NE_FLM_BUFFER_OVERFLOW - #define NE_XFLM_INVALID_XML NE_FLM_INVALID_XML - #define NE_XFLM_ILLEGAL_FLAG NE_FLM_ILLEGAL_FLAG #define NE_XFLM_ILLEGAL_OP NE_FLM_ILLEGAL_OP + #define NE_XFLM_BAD_SEN NE_FLM_BAD_SEN #define NE_XFLM_COULD_NOT_START_THREAD NE_FLM_COULD_NOT_START_THREAD #define NE_XFLM_BAD_BASE64_ENCODING NE_FLM_BAD_BASE64_ENCODING #define NE_XFLM_STREAM_EXISTS NE_FLM_STREAM_EXISTS @@ -4597,248 +4567,254 @@ #define NE_XFLM_BTREE_BAD_STATE NE_FLM_BTREE_BAD_STATE #define NE_XFLM_COULD_NOT_CREATE_MUTEX NE_FLM_COULD_NOT_CREATE_MUTEX #define NE_XFLM_DATA_ERROR NE_FLM_DATA_ERROR - #define NE_XFLM_BAD_DATA_TYPE NE_FLM_BAD_DATA_TYPE - #define NE_XFLM_READ_ONLY NE_FLM_READ_ONLY - #define NE_XFLM_KEY_OVERFLOW NE_FLM_KEY_OVERFLOW - #define NE_XFLM_UNEXPECTED_END_OF_INPUT NE_FLM_UNEXPECTED_END_OF_INPUT #define NE_XFLM_IO_PATH_NOT_FOUND NE_FLM_IO_PATH_NOT_FOUND #define NE_XFLM_IO_END_OF_FILE NE_FLM_IO_END_OF_FILE #define NE_XFLM_IO_NO_MORE_FILES NE_FLM_IO_NO_MORE_FILES + #define NE_XFLM_COULD_NOT_CREATE_SEMAPHORE NE_FLM_COULD_NOT_CREATE_SEMAPHORE + #define NE_XFLM_BAD_UTF8 NE_FLM_BAD_UTF8 + #define NE_XFLM_ERROR_WAITING_ON_SEMPAHORE NE_FLM_ERROR_WAITING_ON_SEMPAHORE /**************************************************************************** Desc: General XFLAIM errors ****************************************************************************/ #define NE_XFLM_OK NE_FLM_OK - #define NE_XFLM_FIRST_GENERAL_ERROR XFLM_ERROR_BASE( 0x0100) // NOTE: This is not an error code - do not document - #define NE_XFLM_BAD_PREFIX XFLM_ERROR_BASE( 0x0101) // Invalid XLM namespace prefix specified. Either a prefix name or number that was specified was not defined. - #define NE_XFLM_ATTRIBUTE_PURGED XFLM_ERROR_BASE( 0x0102) // XML attribute cannot be used - it is being deleted from the database. - #define NE_XFLM_BAD_COLLECTION XFLM_ERROR_BASE( 0x0103) // Invalid collection number specified. Collection is not defined. - #define NE_XFLM_DATABASE_LOCK_REQ_TIMEOUT XFLM_ERROR_BASE( 0x0104) // Request to lock the database timed out. - #define NE_XFLM_ILLEGAL_DATA_COMPONENT XFLM_ERROR_BASE( 0x0105) // Cannot use ELM_ROOT_TAG as a data component in an index. - #define NE_XFLM_MUST_INDEX_ON_PRESENCE XFLM_ERROR_BASE( 0x0106) // When using ELM_ROOT_TAG in an index component, must specify PRESENCE indexing only. - #define NE_XFLM_BAD_IX XFLM_ERROR_BASE( 0x0107) // Invalid index number specified. Index is not defined. - #define NE_XFLM_BACKUP_ACTIVE XFLM_ERROR_BASE( 0x0108) // Operation could not be performed because a backup is currently in progress. - #define NE_XFLM_SERIAL_NUM_MISMATCH XFLM_ERROR_BASE( 0x0109) // Serial number on backup file does not match the serial number that is expected. - #define NE_XFLM_BAD_RFL_DB_SERIAL_NUM XFLM_ERROR_BASE( 0x010A) // Bad database serial number in roll-forward log file header. - #define NE_XFLM_BAD_RFL_FILE_NUMBER XFLM_ERROR_BASE( 0x010B) // Bad roll-forward log file number in roll-forward log file header. - #define NE_XFLM_CANNOT_DEL_ELEMENT XFLM_ERROR_BASE( 0x010C) // Cannot delete an XML element definition in the dictionary because it is in use. - #define NE_XFLM_CANNOT_MOD_DATA_TYPE XFLM_ERROR_BASE( 0x010D) // Cannot modify the data type for an XML element or attribute definition in the dictionary. - #define NE_XFLM_CANNOT_INDEX_DATA_TYPE XFLM_ERROR_BASE( 0x010E) // Data type of XML element or attribute is not one that can be indexed. - #define NE_XFLM_BAD_ELEMENT_NUM XFLM_ERROR_BASE( 0x010F) // Bad element number specified - element not defined in dictionary. - #define NE_XFLM_BAD_ATTRIBUTE_NUM XFLM_ERROR_BASE( 0x0110) // Bad attribute number specified - attribute not defined in dictionary. - #define NE_XFLM_BAD_ENCDEF_NUM XFLM_ERROR_BASE( 0x0111) // Bad encryption number specified - encryption definition not defined in dictionary. - #define NE_XFLM_INVALID_FILE_SEQUENCE XFLM_ERROR_BASE( 0x0112) // Incremental backup file number provided during a restore is invalid. - #define NE_XFLM_DUPLICATE_ELEMENT_NUM XFLM_ERROR_BASE( 0x0113) // Element number specified in element definition is already in use. - #define NE_XFLM_ILLEGAL_TRANS_TYPE XFLM_ERROR_BASE( 0x0114) // Illegal transaction type specified for transaction begin operation. - #define NE_XFLM_UNSUPPORTED_VERSION XFLM_ERROR_BASE( 0x0115) // Version of database found in database header is not supported. - #define NE_XFLM_ILLEGAL_TRANS_OP XFLM_ERROR_BASE( 0x0116) // Illegal operation for transaction type. - #define NE_XFLM_INCOMPLETE_LOG XFLM_ERROR_BASE( 0x0117) // Incomplete rollback log. - #define NE_XFLM_ILLEGAL_INDEX_DEF XFLM_ERROR_BASE( 0x0118) // Index definition document is illegal - does not conform to the expected form of an index definition document. - #define NE_XFLM_ILLEGAL_INDEX_ON XFLM_ERROR_BASE( 0x0119) // The "IndexOn" attribute of an index definition has an illegal value. - #define NE_XFLM_ILLEGAL_STATE_CHANGE XFLM_ERROR_BASE( 0x011A) // Attempted an illegal state change on an element or attribute definition. - #define NE_XFLM_BAD_RFL_SERIAL_NUM XFLM_ERROR_BASE( 0x011B) // Serial number in roll-forward log file header does not match expected serial number. - #define NE_XFLM_NEWER_FLAIM XFLM_ERROR_BASE( 0x011C) // Running old code on a newer version of database. Newer code must be used. - #define NE_XFLM_CANNOT_MOD_ELEMENT_STATE XFLM_ERROR_BASE( 0x011D) // Attempted to change state of a predefined element definition. - #define NE_XFLM_CANNOT_MOD_ATTRIBUTE_STATE XFLM_ERROR_BASE( 0x011E) // Attempted to change state of a predefined attribute definition. - #define NE_XFLM_NO_MORE_ELEMENT_NUMS XFLM_ERROR_BASE( 0x011F) // The highest element number has already been used, cannot create more element definitions. - #define NE_XFLM_NO_TRANS_ACTIVE XFLM_ERROR_BASE( 0x0120) // Operation must be performed inside a database transaction. - #define NE_XFLM_NOT_FLAIM XFLM_ERROR_BASE( 0x0121) // The file specified is not a FLAIM database. - #define NE_XFLM_OLD_VIEW XFLM_ERROR_BASE( 0x0122) // Unable to maintain read transaction's view of the database. - #define NE_XFLM_SHARED_LOCK XFLM_ERROR_BASE( 0x0123) // Attempted to perform an operation on the database that requires exclusive access, but cannot because there is a shared lock. - #define NE_XFLM_TRANS_ACTIVE XFLM_ERROR_BASE( 0x0124) // Operation cannot be performed while a transaction is active. - #define NE_XFLM_RFL_TRANS_GAP XFLM_ERROR_BASE( 0x0125) // A gap was found in the transaction sequence in the roll-forward log. - #define NE_XFLM_BAD_COLLATED_KEY XFLM_ERROR_BASE( 0x0126) // Something in collated key is bad. - #define NE_XFLM_MUST_DELETE_INDEXES XFLM_ERROR_BASE( 0x0127) // Attempting to delete a collection that has indexes defined for it. Associated indexes must be deleted before the collection can be deleted. - #define NE_XFLM_RFL_INCOMPLETE XFLM_ERROR_BASE( 0x0128) // Roll-forward log file is incomplete. - #define NE_XFLM_CANNOT_RESTORE_RFL_FILES XFLM_ERROR_BASE( 0x0129) // Cannot restore roll-forward log files - not using multiple roll-forward log files. - #define NE_XFLM_INCONSISTENT_BACKUP XFLM_ERROR_BASE( 0x012A) // A problem (corruption, etc.) was detected in a backup set. - #define NE_XFLM_BLOCK_CRC XFLM_ERROR_BASE( 0x012B) // CRC for database block was invalid. May indicate problems in reading from or writing to disk. - #define NE_XFLM_ABORT_TRANS XFLM_ERROR_BASE( 0x012C) // Attempted operation after a critical error - transaction should be aborted. - #define NE_XFLM_NOT_RFL XFLM_ERROR_BASE( 0x012D) // File was not a roll-forward log file as expected. - #define NE_XFLM_BAD_RFL_PACKET XFLM_ERROR_BASE( 0x012E) // Roll-forward log file packet was bad. - #define NE_XFLM_DATA_PATH_MISMATCH XFLM_ERROR_BASE( 0x012F) // Bad data path specified to open database. Does not match data path specified for prior opens of the database. - #define NE_XFLM_MUST_CLOSE_DATABASE XFLM_ERROR_BASE( 0x0130) // Database must be closed due to a critical error. - #define NE_XFLM_INVALID_ENCKEY_CRC XFLM_ERROR_BASE( 0x0131) // Encryption key CRC could not be verified. - #define NE_XFLM_HDR_CRC XFLM_ERROR_BASE( 0x0132) // Database header has a bad CRC. - #define NE_XFLM_NO_NAME_TABLE XFLM_ERROR_BASE( 0x0133) // No name table was set up for the database. - #define NE_XFLM_UNALLOWED_UPGRADE XFLM_ERROR_BASE( 0x0134) // Cannot upgrade database from one version to another. - #define NE_XFLM_DUPLICATE_ATTRIBUTE_NUM XFLM_ERROR_BASE( 0x0135) // Attribute number specified in attribute definition is already in use. - #define NE_XFLM_DUPLICATE_INDEX_NUM XFLM_ERROR_BASE( 0x0136) // Index number specified in index definition is already in use. - #define NE_XFLM_DUPLICATE_COLLECTION_NUM XFLM_ERROR_BASE( 0x0137) // Collection number specified in collection definition is already in use. - #define NE_XFLM_DUPLICATE_ELEMENT_NAME XFLM_ERROR_BASE( 0x0138) // Element name+namespace specified in element definition is already in use. - #define NE_XFLM_DUPLICATE_ATTRIBUTE_NAME XFLM_ERROR_BASE( 0x0139) // Attribute name+namespace specified in attribute definition is already in use. - #define NE_XFLM_DUPLICATE_INDEX_NAME XFLM_ERROR_BASE( 0x013A) // Index name specified in index definition is already in use. - #define NE_XFLM_DUPLICATE_COLLECTION_NAME XFLM_ERROR_BASE( 0x013B) // Collection name specified in collection definition is already in use. - #define NE_XFLM_ELEMENT_PURGED XFLM_ERROR_BASE( 0x013C) // XML element cannot be used - it is deleted from the database. - #define NE_XFLM_TOO_MANY_OPEN_DATABASES XFLM_ERROR_BASE( 0x013D) // Too many open databases, cannot open another one. - #define NE_XFLM_DATABASE_OPEN XFLM_ERROR_BASE( 0x013E) // Operation cannot be performed because the database is currently open. - #define NE_XFLM_CACHE_ERROR XFLM_ERROR_BASE( 0x013F) // Cached database block has been compromised while in cache. - #define NE_XFLM_DB_FULL XFLM_ERROR_BASE( 0x0140) // Database is full, cannot create more blocks. - #define NE_XFLM_QUERY_SYNTAX XFLM_ERROR_BASE( 0x0141) // Query expression had improper syntax. - #define NE_XFLM_INDEX_OFFLINE XFLM_ERROR_BASE( 0x0142) // Index is offline, cannot be used in a query. - #define NE_XFLM_RFL_DISK_FULL XFLM_ERROR_BASE( 0x0143) // Disk which contains roll-forward log is full. - #define NE_XFLM_MUST_WAIT_CHECKPOINT XFLM_ERROR_BASE( 0x0144) // Must wait for a checkpoint before starting transaction - due to disk problems - usually in disk containing roll-forward log files. - #define NE_XFLM_MISSING_ENC_ALGORITHM XFLM_ERROR_BASE( 0x0145) // Encryption definition is missing an encryption algorithm. - #define NE_XFLM_INVALID_ENC_ALGORITHM XFLM_ERROR_BASE( 0x0146) // Invalid encryption algorithm specified in encryption definition. - #define NE_XFLM_INVALID_ENC_KEY_SIZE XFLM_ERROR_BASE( 0x0147) // Invalid key size specified in encryption definition. - #define NE_XFLM_ILLEGAL_DATA_TYPE XFLM_ERROR_BASE( 0x0148) // Data type specified for XML element or attribute definition is illegal. - #define NE_XFLM_ILLEGAL_STATE XFLM_ERROR_BASE( 0x0149) // State specified for index definition or XML element or attribute definition is illegal. - #define NE_XFLM_ILLEGAL_ELEMENT_NAME XFLM_ERROR_BASE( 0x014A) // XML element name specified in element definition is illegal. - #define NE_XFLM_ILLEGAL_ATTRIBUTE_NAME XFLM_ERROR_BASE( 0x014B) // XML attribute name specified in attribute definition is illegal. - #define NE_XFLM_ILLEGAL_COLLECTION_NAME XFLM_ERROR_BASE( 0x014C) // Collection name specified in collection definition is illegal. - #define NE_XFLM_ILLEGAL_INDEX_NAME XFLM_ERROR_BASE( 0x014D) // Index name specified is illegal - #define NE_XFLM_ILLEGAL_ELEMENT_NUMBER XFLM_ERROR_BASE( 0x014E) // Element number specified in element definition or index definition is illegal. - #define NE_XFLM_ILLEGAL_ATTRIBUTE_NUMBER XFLM_ERROR_BASE( 0x014F) // Attribute number specified in attribute definition or index definition is illegal. - #define NE_XFLM_ILLEGAL_COLLECTION_NUMBER XFLM_ERROR_BASE( 0x0150) // Collection number specified in collection definition or index definition is illegal. - #define NE_XFLM_ILLEGAL_INDEX_NUMBER XFLM_ERROR_BASE( 0x0151) // Index number specified in index definition is illegal. - #define NE_XFLM_ILLEGAL_ENCDEF_NUMBER XFLM_ERROR_BASE( 0x0152) // Encryption definition number specified in encryption definition is illegal. - #define NE_XFLM_COLLECTION_NAME_MISMATCH XFLM_ERROR_BASE( 0x0153) // Collection name and number specified in index definition do not correspond to each other. - #define NE_XFLM_ELEMENT_NAME_MISMATCH XFLM_ERROR_BASE( 0x0154) // Element name+namespace and number specified in index definition do not correspond to each other. - #define NE_XFLM_ATTRIBUTE_NAME_MISMATCH XFLM_ERROR_BASE( 0x0155) // Attribute name+namespace and number specified in index definition do not correspond to each other. - #define NE_XFLM_INVALID_COMPARE_RULE XFLM_ERROR_BASE( 0x0156) // Invalid comparison rule specified in index definition. - #define NE_XFLM_DUPLICATE_KEY_COMPONENT XFLM_ERROR_BASE( 0x0157) // Duplicate key component number specified in index definition. - #define NE_XFLM_DUPLICATE_DATA_COMPONENT XFLM_ERROR_BASE( 0x0158) // Duplicate data component number specified in index definition. - #define NE_XFLM_MISSING_KEY_COMPONENT XFLM_ERROR_BASE( 0x0159) // Index definition is missing a key component. - #define NE_XFLM_MISSING_DATA_COMPONENT XFLM_ERROR_BASE( 0x015A) // Index definition is missing a data component. - #define NE_XFLM_INVALID_INDEX_OPTION XFLM_ERROR_BASE( 0x015B) // Invalid index option specified on index definition. - #define NE_XFLM_NO_MORE_ATTRIBUTE_NUMS XFLM_ERROR_BASE( 0x015C) // The highest attribute number has already been used, cannot create more. - #define NE_XFLM_MISSING_ELEMENT_NAME XFLM_ERROR_BASE( 0x015D) // Missing element name in XML element definition. - #define NE_XFLM_MISSING_ATTRIBUTE_NAME XFLM_ERROR_BASE( 0x015E) // Missing attribute name in XML attribute definition. - #define NE_XFLM_MISSING_ELEMENT_NUMBER XFLM_ERROR_BASE( 0x015F) // Missing element number in XML element definition. - #define NE_XFLM_MISSING_ATTRIBUTE_NUMBER XFLM_ERROR_BASE( 0x0160) // Missing attribute number from XML attribute definition. - #define NE_XFLM_MISSING_INDEX_NAME XFLM_ERROR_BASE( 0x0161) // Missing index name in index definition. - #define NE_XFLM_MISSING_INDEX_NUMBER XFLM_ERROR_BASE( 0x0162) // Missing index number in index definition. - #define NE_XFLM_MISSING_COLLECTION_NAME XFLM_ERROR_BASE( 0x0163) // Missing collection name in collection definition. - #define NE_XFLM_MISSING_COLLECTION_NUMBER XFLM_ERROR_BASE( 0x0164) // Missing collection number in collection definition. - #define NE_XFLM_MISSING_ENCDEF_NAME XFLM_ERROR_BASE( 0x0165) // Missing encryption definition name in encryption definition. - #define NE_XFLM_MISSING_ENCDEF_NUMBER XFLM_ERROR_BASE( 0x0166) // Missing encryption definition number in encryption definition. - #define NE_XFLM_NO_MORE_INDEX_NUMS XFLM_ERROR_BASE( 0x0167) // The highest index number has already been used, cannot create more. - #define NE_XFLM_NO_MORE_COLLECTION_NUMS XFLM_ERROR_BASE( 0x0168) // The highest collection number has already been used, cannot create more. - #define NE_XFLM_CANNOT_DEL_ATTRIBUTE XFLM_ERROR_BASE( 0x0169) // Cannot delete an XML attribute definition because it is in use. - #define NE_XFLM_TOO_MANY_PENDING_NODES XFLM_ERROR_BASE( 0x016A) // Too many documents in the pending document list. - #define NE_XFLM_BAD_USE_OF_ELM_ROOT_TAG XFLM_ERROR_BASE( 0x016B) // ELM_ROOT_TAG, if used, must be the sole root component of an index definition. - #define NE_XFLM_DUP_SIBLING_IX_COMPONENTS XFLM_ERROR_BASE( 0x016C) // Sibling components in an index definition cannot have the same XML element or attribute number. - #define NE_XFLM_RFL_FILE_NOT_FOUND XFLM_ERROR_BASE( 0x016D) // Could not open a roll-forward log file - was not found in the roll-forward log directory. - #define NE_XFLM_ILLEGAL_KEY_COMPONENT_NUM XFLM_ERROR_BASE( 0x016E) // Key component of zero in index definition is not allowed. - #define NE_XFLM_ILLEGAL_DATA_COMPONENT_NUM XFLM_ERROR_BASE( 0x016F) // Data component of zero in index definition is not allowed. - #define NE_XFLM_ILLEGAL_PREFIX_NUMBER XFLM_ERROR_BASE( 0x0170) // Prefix number specified in prefix definition is illegal. - #define NE_XFLM_MISSING_PREFIX_NAME XFLM_ERROR_BASE( 0x0171) // Missing prefix name in prefix definition. - #define NE_XFLM_MISSING_PREFIX_NUMBER XFLM_ERROR_BASE( 0x0172) // Missing prefix number in prefix definition. - #define NE_XFLM_UNDEFINED_ELEMENT_NAME XFLM_ERROR_BASE( 0x0173) // XML element name+namespace that was specified in index definition or XML document is not defined in dictionary. - #define NE_XFLM_UNDEFINED_ATTRIBUTE_NAME XFLM_ERROR_BASE( 0x0174) // XML attribute name+namespace that was specified in index definition or XML document is not defined in dictionary. - #define NE_XFLM_DUPLICATE_PREFIX_NAME XFLM_ERROR_BASE( 0x0175) // Prefix name specified in prefix definition is already in use. - #define NE_XFLM_NAMESPACE_NOT_ALLOWED XFLM_ERROR_BASE( 0x0176) // Cannot define a namespace for XML attributes whose name begins with "xmlns:" or that is equal to "xmlns" - #define NE_XFLM_INVALID_NAMESPACE_DECL XFLM_ERROR_BASE( 0x0177) // Name for namespace declaration attribute must be "xmlns" or begin with "xmlns:" - #define NE_XFLM_ILLEGAL_NAMESPACE_DECL_DATATYPE XFLM_ERROR_BASE( 0x0178) // Data type for XML attributes that are namespace declarations must be text. - #define NE_XFLM_NO_MORE_PREFIX_NUMS XFLM_ERROR_BASE( 0x0179) // The highest prefix number has already been used, cannot create more. - #define NE_XFLM_NO_MORE_ENCDEF_NUMS XFLM_ERROR_BASE( 0x017A) // The highest encryption definition number has already been used, cannot create more. - #define NE_XFLM_COLLECTION_OFFLINE XFLM_ERROR_BASE( 0x017B) // Collection is encrypted, cannot be accessed while in operating in limited mode. - #define NE_XFLM_DELETE_NOT_ALLOWED XFLM_ERROR_BASE( 0x017C) // Item cannot be deleted. - #define NE_XFLM_RESET_NEEDED XFLM_ERROR_BASE( 0x017D) // Used during check operations to indicate we need to reset the view. NOTE: This is an internal error code and should not be documented. - #define NE_XFLM_ILLEGAL_REQUIRED_VALUE XFLM_ERROR_BASE( 0x017E) // An illegal value was specified for the "Required" attribute in an index definition. - #define NE_XFLM_ILLEGAL_INDEX_COMPONENT XFLM_ERROR_BASE( 0x017F) // A leaf index component in an index definition was not marked as a data component or key component. - #define NE_XFLM_ILLEGAL_UNIQUE_SUB_ELEMENT_VALUE XFLM_ERROR_BASE( 0x0180) // Illegal value for the "UniqueSubElements" attribute in an element definition. - #define NE_XFLM_DATA_TYPE_MUST_BE_NO_DATA XFLM_ERROR_BASE( 0x0181) // Data type for an element definition with UniqueSubElements="yes" must be nodata. - #define NE_XFLM_CANNOT_SET_REQUIRED XFLM_ERROR_BASE( 0x0182) // Cannot set the "Required" attribute on a non-key index component in index definition. - #define NE_XFLM_CANNOT_SET_LIMIT XFLM_ERROR_BASE( 0x0183) // Cannot set the "Limit" attribute on a non-key index component in index definition. - #define NE_XFLM_CANNOT_SET_INDEX_ON XFLM_ERROR_BASE( 0x0184) // Cannot set the "IndexOn" attribute on a non-key index component in index definition. - #define NE_XFLM_CANNOT_SET_COMPARE_RULES XFLM_ERROR_BASE( 0x0185) // Cannot set the "CompareRules" on a non-key index component in index definition. - #define NE_XFLM_INPUT_PENDING XFLM_ERROR_BASE( 0x0186) // Attempt to set a value while an input stream is still open. - #define NE_XFLM_INVALID_NODE_TYPE XFLM_ERROR_BASE( 0x0187) // Bad node type - #define NE_XFLM_INVALID_CHILD_ELM_NODE_ID XFLM_ERROR_BASE( 0x0188) // Attempt to insert a unique child element that has a lower node ID than the parent element - #define NE_XFLM_RFL_END XFLM_ERROR_BASE( 0x0189) // Hit the end of the RFL - #define NE_XFLM_LAST_GENERAL_ERROR XFLM_ERROR_BASE( 0x018A) // NOTE: This is not an error code - do not document - + #define NE_XFLM_USER_ABORT 0xD100 // User or application aborted (canceled) operation. + #define NE_XFLM_BAD_PREFIX 0xD101 // Invalid XLM namespace prefix specified. Either a prefix name or number that was specified was not defined. + #define NE_XFLM_ATTRIBUTE_PURGED 0xD102 // XML attribute cannot be used - it is being deleted from the database. + #define NE_XFLM_BAD_COLLECTION 0xD103 // Invalid collection number specified. Collection is not defined. + #define NE_XFLM_DATABASE_LOCK_REQ_TIMEOUT 0xD104 // Request to lock the database timed out. + #define NE_XFLM_ILLEGAL_DATA_COMPONENT 0xD105 // Cannot use ELM_ROOT_TAG as a data component in an index. + #define NE_XFLM_MUST_INDEX_ON_PRESENCE 0xD106 // When using ELM_ROOT_TAG in an index component, must specify PRESENCE indexing only. + #define NE_XFLM_BAD_IX 0xD107 // Invalid index number specified. Index is not defined. + #define NE_XFLM_BACKUP_ACTIVE 0xD108 // Operation could not be performed because a backup is currently in progress. + #define NE_XFLM_SERIAL_NUM_MISMATCH 0xD109 // Serial number on backup file does not match the serial number that is expected. + #define NE_XFLM_BAD_RFL_DB_SERIAL_NUM 0xD10A // Bad database serial number in roll-forward log file header. + #define NE_XFLM_BAD_RFL_FILE_NUMBER 0xD10B // Bad roll-forward log file number in roll-forward log file header. + #define NE_XFLM_CANNOT_DEL_ELEMENT 0xD10C // Cannot delete an XML element definition in the dictionary because it is in use. + #define NE_XFLM_CANNOT_MOD_DATA_TYPE 0xD10D // Cannot modify the data type for an XML element or attribute definition in the dictionary. + #define NE_XFLM_CANNOT_INDEX_DATA_TYPE 0xD10E // Data type of XML element or attribute is not one that can be indexed. + #define NE_XFLM_BAD_ELEMENT_NUM 0xD10F // Bad element number specified - element not defined in dictionary. + #define NE_XFLM_BAD_ATTRIBUTE_NUM 0xD110 // Bad attribute number specified - attribute not defined in dictionary. + #define NE_XFLM_BAD_ENCDEF_NUM 0xD111 // Bad encryption number specified - encryption definition not defined in dictionary. + #define NE_XFLM_INVALID_FILE_SEQUENCE 0xD112 // Incremental backup file number provided during a restore is invalid. + #define NE_XFLM_DUPLICATE_ELEMENT_NUM 0xD113 // Element number specified in element definition is already in use. + #define NE_XFLM_ILLEGAL_TRANS_TYPE 0xD114 // Illegal transaction type specified for transaction begin operation. + #define NE_XFLM_UNSUPPORTED_VERSION 0xD115 // Version of database found in database header is not supported. + #define NE_XFLM_ILLEGAL_TRANS_OP 0xD116 // Illegal operation for transaction type. + #define NE_XFLM_INCOMPLETE_LOG 0xD117 // Incomplete rollback log. + #define NE_XFLM_ILLEGAL_INDEX_DEF 0xD118 // Index definition document is illegal - does not conform to the expected form of an index definition document. + #define NE_XFLM_ILLEGAL_INDEX_ON 0xD119 // The "IndexOn" attribute of an index definition has an illegal value. + #define NE_XFLM_ILLEGAL_STATE_CHANGE 0xD11A // Attempted an illegal state change on an element or attribute definition. + #define NE_XFLM_BAD_RFL_SERIAL_NUM 0xD11B // Serial number in roll-forward log file header does not match expected serial number. + #define NE_XFLM_NEWER_FLAIM 0xD11C // Running old code on a newer version of database. Newer code must be used. + #define NE_XFLM_CANNOT_MOD_ELEMENT_STATE 0xD11D // Attempted to change state of a predefined element definition. + #define NE_XFLM_CANNOT_MOD_ATTRIBUTE_STATE 0xD11E // Attempted to change state of a predefined attribute definition. + #define NE_XFLM_NO_MORE_ELEMENT_NUMS 0xD11F // The highest element number has already been used, cannot create more element definitions. + #define NE_XFLM_NO_TRANS_ACTIVE 0xD120 // Operation must be performed inside a database transaction. + #define NE_XFLM_NOT_FLAIM 0xD121 // The file specified is not a FLAIM database. + #define NE_XFLM_OLD_VIEW 0xD122 // Unable to maintain read transaction's view of the database. + #define NE_XFLM_SHARED_LOCK 0xD123 // Attempted to perform an operation on the database that requires exclusive access, but cannot because there is a shared lock. + #define NE_XFLM_TRANS_ACTIVE 0xD124 // Operation cannot be performed while a transaction is active. + #define NE_XFLM_RFL_TRANS_GAP 0xD125 // A gap was found in the transaction sequence in the roll-forward log. + #define NE_XFLM_BAD_COLLATED_KEY 0xD126 // Something in collated key is bad. + #define NE_XFLM_MUST_DELETE_INDEXES 0xD127 // Attempting to delete a collection that has indexes defined for it. Associated indexes must be deleted before the collection can be deleted. + #define NE_XFLM_RFL_INCOMPLETE 0xD128 // Roll-forward log file is incomplete. + #define NE_XFLM_CANNOT_RESTORE_RFL_FILES 0xD129 // Cannot restore roll-forward log files - not using multiple roll-forward log files. + #define NE_XFLM_INCONSISTENT_BACKUP 0xD12A // A problem (corruption), etc. was detected in a backup set. + #define NE_XFLM_BLOCK_CRC 0xD12B // CRC for database block was invalid. May indicate problems in reading from or writing to disk. + #define NE_XFLM_ABORT_TRANS 0xD12C // Attempted operation after a critical error - transaction should be aborted. + #define NE_XFLM_NOT_RFL 0xD12D // File was not a roll-forward log file as expected. + #define NE_XFLM_BAD_RFL_PACKET 0xD12E // Roll-forward log file packet was bad. + #define NE_XFLM_DATA_PATH_MISMATCH 0xD12F // Bad data path specified to open database. Does not match data path specified for prior opens of the database. + #define NE_XFLM_MUST_CLOSE_DATABASE 0xD130 // Database must be closed due to a critical error. + #define NE_XFLM_INVALID_ENCKEY_CRC 0xD131 // Encryption key CRC could not be verified. + #define NE_XFLM_HDR_CRC 0xD132 // Database header has a bad CRC. + #define NE_XFLM_NO_NAME_TABLE 0xD133 // No name table was set up for the database. + #define NE_XFLM_UNALLOWED_UPGRADE 0xD134 // Cannot upgrade database from one version to another. + #define NE_XFLM_DUPLICATE_ATTRIBUTE_NUM 0xD135 // Attribute number specified in attribute definition is already in use. + #define NE_XFLM_DUPLICATE_INDEX_NUM 0xD136 // Index number specified in index definition is already in use. + #define NE_XFLM_DUPLICATE_COLLECTION_NUM 0xD137 // Collection number specified in collection definition is already in use. + #define NE_XFLM_DUPLICATE_ELEMENT_NAME 0xD138 // Element name+namespace specified in element definition is already in use. + #define NE_XFLM_DUPLICATE_ATTRIBUTE_NAME 0xD139 // Attribute name+namespace specified in attribute definition is already in use. + #define NE_XFLM_DUPLICATE_INDEX_NAME 0xD13A // Index name specified in index definition is already in use. + #define NE_XFLM_DUPLICATE_COLLECTION_NAME 0xD13B // Collection name specified in collection definition is already in use. + #define NE_XFLM_ELEMENT_PURGED 0xD13C // XML element cannot be used - it is deleted from the database. + #define NE_XFLM_TOO_MANY_OPEN_DATABASES 0xD13D // Too many open databases, cannot open another one. + #define NE_XFLM_DATABASE_OPEN 0xD13E // Operation cannot be performed because the database is currently open. + #define NE_XFLM_CACHE_ERROR 0xD13F // Cached database block has been compromised while in cache. + #define NE_XFLM_DB_FULL 0xD140 // Database is full, cannot create more blocks. + #define NE_XFLM_QUERY_SYNTAX 0xD141 // Query expression had improper syntax. + #define NE_XFLM_INDEX_OFFLINE 0xD142 // Index is offline, cannot be used in a query. + #define NE_XFLM_RFL_DISK_FULL 0xD143 // Disk which contains roll-forward log is full. + #define NE_XFLM_MUST_WAIT_CHECKPOINT 0xD144 // Must wait for a checkpoint before starting transaction - due to disk problems - usually in disk containing roll-forward log files. + #define NE_XFLM_MISSING_ENC_ALGORITHM 0xD145 // Encryption definition is missing an encryption algorithm. + #define NE_XFLM_INVALID_ENC_ALGORITHM 0xD146 // Invalid encryption algorithm specified in encryption definition. + #define NE_XFLM_INVALID_ENC_KEY_SIZE 0xD147 // Invalid key size specified in encryption definition. + #define NE_XFLM_ILLEGAL_DATA_TYPE 0xD148 // Data type specified for XML element or attribute definition is illegal. + #define NE_XFLM_ILLEGAL_STATE 0xD149 // State specified for index definition or XML element or attribute definition is illegal. + #define NE_XFLM_ILLEGAL_ELEMENT_NAME 0xD14A // XML element name specified in element definition is illegal. + #define NE_XFLM_ILLEGAL_ATTRIBUTE_NAME 0xD14B // XML attribute name specified in attribute definition is illegal. + #define NE_XFLM_ILLEGAL_COLLECTION_NAME 0xD14C // Collection name specified in collection definition is illegal. + #define NE_XFLM_ILLEGAL_INDEX_NAME 0xD14D // Index name specified is illegal + #define NE_XFLM_ILLEGAL_ELEMENT_NUMBER 0xD14E // Element number specified in element definition or index definition is illegal. + #define NE_XFLM_ILLEGAL_ATTRIBUTE_NUMBER 0xD14F // Attribute number specified in attribute definition or index definition is illegal. + #define NE_XFLM_ILLEGAL_COLLECTION_NUMBER 0xD150 // Collection number specified in collection definition or index definition is illegal. + #define NE_XFLM_ILLEGAL_INDEX_NUMBER 0xD151 // Index number specified in index definition is illegal. + #define NE_XFLM_ILLEGAL_ENCDEF_NUMBER 0xD152 // Encryption definition number specified in encryption definition is illegal. + #define NE_XFLM_COLLECTION_NAME_MISMATCH 0xD153 // Collection name and number specified in index definition do not correspond to each other. + #define NE_XFLM_ELEMENT_NAME_MISMATCH 0xD154 // Element name+namespace and number specified in index definition do not correspond to each other. + #define NE_XFLM_ATTRIBUTE_NAME_MISMATCH 0xD155 // Attribute name+namespace and number specified in index definition do not correspond to each other. + #define NE_XFLM_INVALID_COMPARE_RULE 0xD156 // Invalid comparison rule specified in index definition. + #define NE_XFLM_DUPLICATE_KEY_COMPONENT 0xD157 // Duplicate key component number specified in index definition. + #define NE_XFLM_DUPLICATE_DATA_COMPONENT 0xD158 // Duplicate data component number specified in index definition. + #define NE_XFLM_MISSING_KEY_COMPONENT 0xD159 // Index definition is missing a key component. + #define NE_XFLM_MISSING_DATA_COMPONENT 0xD15A // Index definition is missing a data component. + #define NE_XFLM_INVALID_INDEX_OPTION 0xD15B // Invalid index option specified on index definition. + #define NE_XFLM_NO_MORE_ATTRIBUTE_NUMS 0xD15C // The highest attribute number has already been used, cannot create more. + #define NE_XFLM_MISSING_ELEMENT_NAME 0xD15D // Missing element name in XML element definition. + #define NE_XFLM_MISSING_ATTRIBUTE_NAME 0xD15E // Missing attribute name in XML attribute definition. + #define NE_XFLM_MISSING_ELEMENT_NUMBER 0xD15F // Missing element number in XML element definition. + #define NE_XFLM_MISSING_ATTRIBUTE_NUMBER 0xD160 // Missing attribute number from XML attribute definition. + #define NE_XFLM_MISSING_INDEX_NAME 0xD161 // Missing index name in index definition. + #define NE_XFLM_MISSING_INDEX_NUMBER 0xD162 // Missing index number in index definition. + #define NE_XFLM_MISSING_COLLECTION_NAME 0xD163 // Missing collection name in collection definition. + #define NE_XFLM_MISSING_COLLECTION_NUMBER 0xD164 // Missing collection number in collection definition. + #define NE_XFLM_MISSING_ENCDEF_NAME 0xD165 // Missing encryption definition name in encryption definition. + #define NE_XFLM_MISSING_ENCDEF_NUMBER 0xD166 // Missing encryption definition number in encryption definition. + #define NE_XFLM_NO_MORE_INDEX_NUMS 0xD167 // The highest index number has already been used, cannot create more. + #define NE_XFLM_NO_MORE_COLLECTION_NUMS 0xD168 // The highest collection number has already been used, cannot create more. + #define NE_XFLM_CANNOT_DEL_ATTRIBUTE 0xD169 // Cannot delete an XML attribute definition because it is in use. + #define NE_XFLM_TOO_MANY_PENDING_NODES 0xD16A // Too many documents in the pending document list. + #define NE_XFLM_BAD_USE_OF_ELM_ROOT_TAG 0xD16B // ELM_ROOT_TAG, if used, must be the sole root component of an index definition. + #define NE_XFLM_DUP_SIBLING_IX_COMPONENTS 0xD16C // Sibling components in an index definition cannot have the same XML element or attribute number. + #define NE_XFLM_RFL_FILE_NOT_FOUND 0xD16D // Could not open a roll-forward log file - was not found in the roll-forward log directory. + #define NE_XFLM_ILLEGAL_KEY_COMPONENT_NUM 0xD16E // Key component of zero in index definition is not allowed. + #define NE_XFLM_ILLEGAL_DATA_COMPONENT_NUM 0xD16F // Data component of zero in index definition is not allowed. + #define NE_XFLM_ILLEGAL_PREFIX_NUMBER 0xD170 // Prefix number specified in prefix definition is illegal. + #define NE_XFLM_MISSING_PREFIX_NAME 0xD171 // Missing prefix name in prefix definition. + #define NE_XFLM_MISSING_PREFIX_NUMBER 0xD172 // Missing prefix number in prefix definition. + #define NE_XFLM_UNDEFINED_ELEMENT_NAME 0xD173 // XML element name+namespace that was specified in index definition or XML document is not defined in dictionary. + #define NE_XFLM_UNDEFINED_ATTRIBUTE_NAME 0xD174 // XML attribute name+namespace that was specified in index definition or XML document is not defined in dictionary. + #define NE_XFLM_DUPLICATE_PREFIX_NAME 0xD175 // Prefix name specified in prefix definition is already in use. + #define NE_XFLM_NAMESPACE_NOT_ALLOWED 0xD176 // Cannot define a namespace for XML attributes whose name begins with "xmlns:" or that is equal to "xmlns" + #define NE_XFLM_INVALID_NAMESPACE_DECL 0xD177 // Name for namespace declaration attribute must be "xmlns" or begin with "xmlns:" + #define NE_XFLM_ILLEGAL_NAMESPACE_DECL_DATATYPE 0xD178 // Data type for XML attributes that are namespace declarations must be text. + #define NE_XFLM_NO_MORE_PREFIX_NUMS 0xD179 // The highest prefix number has already been used, cannot create more. + #define NE_XFLM_NO_MORE_ENCDEF_NUMS 0xD17A // The highest encryption definition number has already been used, cannot create more. + #define NE_XFLM_COLLECTION_OFFLINE 0xD17B // Collection is encrypted, cannot be accessed while in operating in limited mode. + #define NE_XFLM_DELETE_NOT_ALLOWED 0xD17C // Item cannot be deleted. + #define NE_XFLM_RESET_NEEDED 0xD17D // Used during check operations to indicate we need to reset the view. NOTE: This is an internal error code and should not be documented. + #define NE_XFLM_ILLEGAL_REQUIRED_VALUE 0xD17E // An illegal value was specified for the "Required" attribute in an index definition. + #define NE_XFLM_ILLEGAL_INDEX_COMPONENT 0xD17F // A leaf index component in an index definition was not marked as a data component or key component. + #define NE_XFLM_ILLEGAL_UNIQUE_SUB_ELEMENT_VALUE 0xD180 // Illegal value for the "UniqueSubElements" attribute in an element definition. + #define NE_XFLM_DATA_TYPE_MUST_BE_NO_DATA 0xD181 // Data type for an element definition with UniqueSubElements="yes" must be nodata. + #define NE_XFLM_CANNOT_SET_REQUIRED 0xD182 // Cannot set the "Required" attribute on a non-key index component in index definition. + #define NE_XFLM_CANNOT_SET_LIMIT 0xD183 // Cannot set the "Limit" attribute on a non-key index component in index definition. + #define NE_XFLM_CANNOT_SET_INDEX_ON 0xD184 // Cannot set the "IndexOn" attribute on a non-key index component in index definition. + #define NE_XFLM_CANNOT_SET_COMPARE_RULES 0xD185 // Cannot set the "CompareRules" on a non-key index component in index definition. + #define NE_XFLM_INPUT_PENDING 0xD186 // Attempt to set a value while an input stream is still open. + #define NE_XFLM_INVALID_NODE_TYPE 0xD187 // Bad node type + #define NE_XFLM_INVALID_CHILD_ELM_NODE_ID 0xD188 // Attempt to insert a unique child element that has a lower node ID than the parent element + #define NE_XFLM_RFL_END 0xD189 // Hit the end of the RFL + #define NE_XFLM_ILLEGAL_FLAG 0xD18A // Illegal flag passed to getChildElement method. Must be zero for elements that can have non-unique child elements. + #define NE_XFLM_TIMEOUT 0xD18B // Operation timed out. + #define NE_XFLM_CONV_BAD_DIGIT 0xD18C // Non-numeric digit found in text to numeric conversion. + #define NE_XFLM_CONV_NULL_SRC 0xD18D // Data source cannot be NULL when doing data conversion. + #define NE_XFLM_CONV_NUM_UNDERFLOW 0xD18E // Numeric underflow (< lower bound) converting to numeric type. + #define NE_XFLM_UNSUPPORTED_FEATURE 0xD18F // Attempting to use a feature for which full support has been disabled. + #define NE_XFLM_FILE_EXISTS 0xD190 // Attempt to create a database, but the file already exists. + #define NE_XFLM_BUFFER_OVERFLOW 0xD191 // Buffer overflow. + #define NE_XFLM_INVALID_XML 0xD192 // Invalid XML encountered while parsing document. + #define NE_XFLM_BAD_DATA_TYPE 0xD193 // Attempt to set/get data on an XML element or attribute using a data type that is incompatible with the data type specified in the dictionary. + #define NE_XFLM_READ_ONLY 0xD194 // Item is read-only and cannot be updated. + #define NE_XFLM_KEY_OVERFLOW 0xD195 // Generated index key too large. + #define NE_XFLM_UNEXPECTED_END_OF_INPUT 0xD196 // Encountered unexpected end of input when parsing XPATH expression. + #define NE_XFLM_BAD_PLATFORM_FORMAT 0xD197 // Cannot support platform format. NOTE: No need to document this one, it is strictly internal. + /**************************************************************************** Desc: DOM Errors ****************************************************************************/ - #define NE_XFLM_FIRST_DOM_ERROR XFLM_ERROR_BASE( 0x1100) // NOTE: This is not an error code - do not document - #define NE_XFLM_DOM_HIERARCHY_REQUEST_ERR XFLM_ERROR_BASE( 0x1101) // Attempt to insert a DOM node somewhere it doesn't belong. - #define NE_XFLM_DOM_WRONG_DOCUMENT_ERR XFLM_ERROR_BASE( 0x1102) // A DOM node is being used in a different document than the one that created it. - #define NE_XFLM_DOM_DATA_ERROR XFLM_ERROR_BASE( 0x1103) // Links between DOM nodes in a document are corrupt. - #define NE_XFLM_DOM_NODE_NOT_FOUND XFLM_ERROR_BASE( 0x1104) // The requested DOM node does not exist. - #define NE_XFLM_DOM_INVALID_CHILD_TYPE XFLM_ERROR_BASE( 0x1105) // Attempting to insert a child DOM node whose type cannot be inserted as a child node. - #define NE_XFLM_DOM_NODE_DELETED XFLM_ERROR_BASE( 0x1106) // DOM node being accessed has been deleted. - #define NE_XFLM_DOM_DUPLICATE_ELEMENT XFLM_ERROR_BASE( 0x1107) // Node already has a child element with the given name id - this node's child nodes must all be unique. - #define NE_XFLM_LAST_DOM_ERROR XFLM_ERROR_BASE( 0x1108) // NOTE: This is not an error code - do not document + #define NE_XFLM_DOM_HIERARCHY_REQUEST_ERR 0xD201 // Attempt to insert a DOM node somewhere it doesn't belong. + #define NE_XFLM_DOM_WRONG_DOCUMENT_ERR 0xD202 // A DOM node is being used in a different document than the one that created it. + #define NE_XFLM_DOM_DATA_ERROR 0xD203 // Links between DOM nodes in a document are corrupt. + #define NE_XFLM_DOM_NODE_NOT_FOUND 0xD204 // The requested DOM node does not exist. + #define NE_XFLM_DOM_INVALID_CHILD_TYPE 0xD205 // Attempting to insert a child DOM node whose type cannot be inserted as a child node. + #define NE_XFLM_DOM_NODE_DELETED 0xD206 // DOM node being accessed has been deleted. + #define NE_XFLM_DOM_DUPLICATE_ELEMENT 0xD207 // Node already has a child element with the given name id - this node's child nodes must all be unique. /**************************************************************************** Desc: Query Errors ****************************************************************************/ - #define NE_XFLM_FIRST_QUERY_ERROR XFLM_ERROR_BASE( 0x2100) // NOTE: This is not an error code - do not document - #define NE_XFLM_Q_UNMATCHED_RPAREN XFLM_ERROR_BASE( 0x2101) // Query setup error: Unmatched right paren. - #define NE_XFLM_Q_UNEXPECTED_LPAREN XFLM_ERROR_BASE( 0x2102) // Query setup error: Unexpected left paren. - #define NE_XFLM_Q_UNEXPECTED_RPAREN XFLM_ERROR_BASE( 0x2103) // Query setup error: Unexpected right paren. - #define NE_XFLM_Q_EXPECTING_OPERAND XFLM_ERROR_BASE( 0x2104) // Query setup error: Expecting an operand. - #define NE_XFLM_Q_EXPECTING_OPERATOR XFLM_ERROR_BASE( 0x2105) // Query setup error: Expecting an operator. - #define NE_XFLM_Q_UNEXPECTED_COMMA XFLM_ERROR_BASE( 0x2106) // Query setup error: Unexpected comma. - #define NE_XFLM_Q_EXPECTING_LPAREN XFLM_ERROR_BASE( 0x2107) // Query setup error: Expecting a left paren. - #define NE_XFLM_Q_UNEXPECTED_VALUE XFLM_ERROR_BASE( 0x2108) // Query setup error: Unexpected value. - #define NE_XFLM_Q_INVALID_NUM_FUNC_ARGS XFLM_ERROR_BASE( 0x2109) // Query setup error: Invalid number of arguments for a function. - #define NE_XFLM_Q_UNEXPECTED_XPATH_COMPONENT XFLM_ERROR_BASE( 0x210A) // Query setup error: Unexpected XPATH componenent. - #define NE_XFLM_Q_ILLEGAL_LBRACKET XFLM_ERROR_BASE( 0x210B) // Query setup error: Illegal left bracket ([). - #define NE_XFLM_Q_ILLEGAL_RBRACKET XFLM_ERROR_BASE( 0x210C) // Query setup error: Illegal right bracket (]). - #define NE_XFLM_Q_ILLEGAL_OPERAND XFLM_ERROR_BASE( 0x210D) // Query setup error: Operand for some operator is not valid for that operator type. - #define NE_XFLM_Q_ALREADY_OPTIMIZED XFLM_ERROR_BASE( 0x210E) // Operation is illegal, cannot change certain things after query has been optimized. - #define NE_XFLM_Q_MISMATCHED_DB XFLM_ERROR_BASE( 0x210F) // Database handle passed in does not match database associated with query. - #define NE_XFLM_Q_ILLEGAL_OPERATOR XFLM_ERROR_BASE( 0x2110) // Illegal operator - cannot pass this operator into the addOperator method. - #define NE_XFLM_Q_ILLEGAL_COMPARE_RULES XFLM_ERROR_BASE( 0x2111) // Illegal combination of comparison rules passed to addOperator method. - #define NE_XFLM_Q_INCOMPLETE_QUERY_EXPR XFLM_ERROR_BASE( 0x2112) // Query setup error: Query expression is incomplete. - #define NE_XFLM_Q_NOT_POSITIONED XFLM_ERROR_BASE( 0x2113) // Query not positioned due to previous error, cannot call getNext, getPrev, or getCurrent - #define NE_XFLM_Q_INVALID_NODE_ID_VALUE XFLM_ERROR_BASE( 0x2114) // Query setup error: Invalid type of value constant used for node id value comparison. - #define NE_XFLM_Q_INVALID_META_DATA_TYPE XFLM_ERROR_BASE( 0x2115) // Query setup error: Invalid meta data type specified. - #define NE_XFLM_Q_NEW_EXPR_NOT_ALLOWED XFLM_ERROR_BASE( 0x2116) // Query setup error: Cannot add an expression to an XPATH component after having added an expression that tests context position. - #define NE_XFLM_Q_INVALID_CONTEXT_POS XFLM_ERROR_BASE( 0x2117) // Invalid context position value encountered - must be a positive number. - #define NE_XFLM_Q_INVALID_FUNC_ARG XFLM_ERROR_BASE( 0x2118) // Query setup error: Parameter to user-defined functions must be a single XPATH only. - #define NE_XFLM_Q_EXPECTING_RPAREN XFLM_ERROR_BASE( 0x2119) // Query setup error: Expecting right paren. - #define NE_XFLM_Q_TOO_LATE_TO_ADD_SORT_KEYS XFLM_ERROR_BASE( 0x211A) // Query setup error: Cannot add sort keys after having called getFirst, getLast, getNext, or getPrev. - #define NE_XFLM_Q_INVALID_SORT_KEY_COMPONENT XFLM_ERROR_BASE( 0x211B) // Query setup error: Invalid sort key component number specified in query. - #define NE_XFLM_Q_DUPLICATE_SORT_KEY_COMPONENT XFLM_ERROR_BASE( 0x211C) // Query setup error: Duplicate sort key component number specified in query. - #define NE_XFLM_Q_MISSING_SORT_KEY_COMPONENT XFLM_ERROR_BASE( 0x211D) // Query setup error: Missing sort key component number in sort keys that were specified for query. - #define NE_XFLM_Q_NO_SORT_KEY_COMPONENTS_SPECIFIED XFLM_ERROR_BASE( 0x211E) // Query setup error: addSortKeys was called, but no sort key components were specified. - #define NE_XFLM_Q_SORT_KEY_CONTEXT_MUST_BE_ELEMENT XFLM_ERROR_BASE( 0x211F) // Query setup error: A sort key context cannot be an XML attribute. - #define NE_XFLM_Q_INVALID_ELEMENT_NUM_IN_SORT_KEYS XFLM_ERROR_BASE( 0x2120) // Query setup error: The XML element number specified for a sort key in a query is invalid - no element definition in the dictionary. - #define NE_XFLM_Q_INVALID_ATTR_NUM_IN_SORT_KEYS XFLM_ERROR_BASE( 0x2121) // Query setup error: The XML attribute number specified for a sort key in a query is invalid - no attribute definition in the dictionary. - #define NE_XFLM_Q_NON_POSITIONABLE_QUERY XFLM_ERROR_BASE( 0x2122) // Attempt is being made to position in a query that is not positionable. - #define NE_XFLM_Q_INVALID_POSITION XFLM_ERROR_BASE( 0x2123) // Attempt is being made to position to an invalid position in the result set. - #define NE_XFLM_LAST_QUERY_ERROR XFLM_ERROR_BASE( 0x2124) // NOTE: This is not an error code - do not document + #define NE_XFLM_Q_UNMATCHED_RPAREN 0xD301 // Query setup error: Unmatched right paren. + #define NE_XFLM_Q_UNEXPECTED_LPAREN 0xD302 // Query setup error: Unexpected left paren. + #define NE_XFLM_Q_UNEXPECTED_RPAREN 0xD303 // Query setup error: Unexpected right paren. + #define NE_XFLM_Q_EXPECTING_OPERAND 0xD304 // Query setup error: Expecting an operand. + #define NE_XFLM_Q_EXPECTING_OPERATOR 0xD305 // Query setup error: Expecting an operator. + #define NE_XFLM_Q_UNEXPECTED_COMMA 0xD306 // Query setup error: Unexpected comma. + #define NE_XFLM_Q_EXPECTING_LPAREN 0xD307 // Query setup error: Expecting a left paren. + #define NE_XFLM_Q_UNEXPECTED_VALUE 0xD308 // Query setup error: Unexpected value. + #define NE_XFLM_Q_INVALID_NUM_FUNC_ARGS 0xD309 // Query setup error: Invalid number of arguments for a function. + #define NE_XFLM_Q_UNEXPECTED_XPATH_COMPONENT 0xD30A // Query setup error: Unexpected XPATH componenent. + #define NE_XFLM_Q_ILLEGAL_LBRACKET 0xD30B // Query setup error: Illegal left bracket ([). + #define NE_XFLM_Q_ILLEGAL_RBRACKET 0xD30C // Query setup error: Illegal right bracket (]). + #define NE_XFLM_Q_ILLEGAL_OPERAND 0xD30D // Query setup error: Operand for some operator is not valid for that operator type. + #define NE_XFLM_Q_ALREADY_OPTIMIZED 0xD30E // Operation is illegal, cannot change certain things after query has been optimized. + #define NE_XFLM_Q_MISMATCHED_DB 0xD30F // Database handle passed in does not match database associated with query. + #define NE_XFLM_Q_ILLEGAL_OPERATOR 0xD310 // Illegal operator - cannot pass this operator into the addOperator method. + #define NE_XFLM_Q_ILLEGAL_COMPARE_RULES 0xD311 // Illegal combination of comparison rules passed to addOperator method. + #define NE_XFLM_Q_INCOMPLETE_QUERY_EXPR 0xD312 // Query setup error: Query expression is incomplete. + #define NE_XFLM_Q_NOT_POSITIONED 0xD313 // Query not positioned due to previous error, cannot call getNext, getPrev, or getCurrent + #define NE_XFLM_Q_INVALID_NODE_ID_VALUE 0xD314 // Query setup error: Invalid type of value constant used for node id value comparison. + #define NE_XFLM_Q_INVALID_META_DATA_TYPE 0xD315 // Query setup error: Invalid meta data type specified. + #define NE_XFLM_Q_NEW_EXPR_NOT_ALLOWED 0xD316 // Query setup error: Cannot add an expression to an XPATH component after having added an expression that tests context position. + #define NE_XFLM_Q_INVALID_CONTEXT_POS 0xD317 // Invalid context position value encountered - must be a positive number. + #define NE_XFLM_Q_INVALID_FUNC_ARG 0xD318 // Query setup error: Parameter to user-defined functions must be a single XPATH only. + #define NE_XFLM_Q_EXPECTING_RPAREN 0xD319 // Query setup error: Expecting right paren. + #define NE_XFLM_Q_TOO_LATE_TO_ADD_SORT_KEYS 0xD31A // Query setup error: Cannot add sort keys after having called getFirst, getLast, getNext, or getPrev. + #define NE_XFLM_Q_INVALID_SORT_KEY_COMPONENT 0xD31B // Query setup error: Invalid sort key component number specified in query. + #define NE_XFLM_Q_DUPLICATE_SORT_KEY_COMPONENT 0xD31C // Query setup error: Duplicate sort key component number specified in query. + #define NE_XFLM_Q_MISSING_SORT_KEY_COMPONENT 0xD31D // Query setup error: Missing sort key component number in sort keys that were specified for query. + #define NE_XFLM_Q_NO_SORT_KEY_COMPONENTS_SPECIFIED 0xD31E // Query setup error: addSortKeys was called, but no sort key components were specified. + #define NE_XFLM_Q_SORT_KEY_CONTEXT_MUST_BE_ELEMENT 0xD31F // Query setup error: A sort key context cannot be an XML attribute. + #define NE_XFLM_Q_INVALID_ELEMENT_NUM_IN_SORT_KEYS 0xD320 // Query setup error: The XML element number specified for a sort key in a query is invalid - no element definition in the dictionary. + #define NE_XFLM_Q_INVALID_ATTR_NUM_IN_SORT_KEYS 0xD321 // Query setup error: The XML attribute number specified for a sort key in a query is invalid - no attribute definition in the dictionary. + #define NE_XFLM_Q_NON_POSITIONABLE_QUERY 0xD322 // Attempt is being made to position in a query that is not positionable. + #define NE_XFLM_Q_INVALID_POSITION 0xD323 // Attempt is being made to position to an invalid position in the result set. /**************************************************************************** Desc: NICI / Encryption Errors ****************************************************************************/ - #define NE_XFLM_FIRST_NICI_ERROR XFLM_ERROR_BASE( 0x3100) // NOTE: This is not an error code - do not document - #define NE_XFLM_NICI_CONTEXT XFLM_ERROR_BASE( 0x3101) // Error occurred while creating NICI context for encryption/decryption. - #define NE_XFLM_NICI_ATTRIBUTE_VALUE XFLM_ERROR_BASE( 0x3102) // Error occurred while accessing an attribute on a NICI encryption key. - #define NE_XFLM_NICI_BAD_ATTRIBUTE XFLM_ERROR_BASE( 0x3103) // Value retrieved from an attribute on a NICI encryption key was bad. - #define NE_XFLM_NICI_WRAPKEY_FAILED XFLM_ERROR_BASE( 0x3104) // Error occurred while wrapping a NICI encryption key in another NICI encryption key. - #define NE_XFLM_NICI_UNWRAPKEY_FAILED XFLM_ERROR_BASE( 0x3105) // Error occurred while unwrapping a NICI encryption key that is wrapped in another NICI encryption key. - #define NE_XFLM_NICI_INVALID_ALGORITHM XFLM_ERROR_BASE( 0x3106) // Attempt to use invalid NICI encryption algorithm. - #define NE_XFLM_NICI_GENKEY_FAILED XFLM_ERROR_BASE( 0x3107) // Error occurred while attempting to generate a NICI encryption key. - #define NE_XFLM_NICI_BAD_RANDOM XFLM_ERROR_BASE( 0x3108) // Error occurred while generating random data using NICI. - #define NE_XFLM_PBE_ENCRYPT_FAILED XFLM_ERROR_BASE( 0x3109) // Error occurred while attempting to wrap a NICI encryption key in a password. - #define NE_XFLM_PBE_DECRYPT_FAILED XFLM_ERROR_BASE( 0x310A) // Error occurred while attempting to unwrap a NICI encryption key that was previously wrapped in a password. - #define NE_XFLM_DIGEST_INIT_FAILED XFLM_ERROR_BASE( 0x310B) // Error occurred while attempting to initialize the NICI digest functionality. - #define NE_XFLM_DIGEST_FAILED XFLM_ERROR_BASE( 0x310C) // Error occurred while attempting to create a NICI digest. - #define NE_XFLM_INJECT_KEY_FAILED XFLM_ERROR_BASE( 0x310D) // Error occurred while attempting to inject an encryption key into NICI. - #define NE_XFLM_NICI_FIND_INIT XFLM_ERROR_BASE( 0x310E) // Error occurred while attempting to initialize NICI to find information on a NICI encryption key. - #define NE_XFLM_NICI_FIND_OBJECT XFLM_ERROR_BASE( 0x310F) // Error occurred while attempting to find information on a NICI encryption key. - #define NE_XFLM_NICI_KEY_NOT_FOUND XFLM_ERROR_BASE( 0x3110) // Could not find the NICI encryption key or information on the NICI encryption key. - #define NE_XFLM_NICI_ENC_INIT_FAILED XFLM_ERROR_BASE( 0x3111) // Error occurred while initializing NICI to encrypt data. - #define NE_XFLM_NICI_ENCRYPT_FAILED XFLM_ERROR_BASE( 0x3112) // Error occurred while encrypting data. - #define NE_XFLM_NICI_DECRYPT_INIT_FAILED XFLM_ERROR_BASE( 0x3113) // Error occurred while initializing NICI to decrypt data. - #define NE_XFLM_NICI_DECRYPT_FAILED XFLM_ERROR_BASE( 0x3114) // Error occurred while decrypting data. - #define NE_XFLM_NICI_WRAPKEY_NOT_FOUND XFLM_ERROR_BASE( 0x3115) // Could not find the NICI encryption key used to wrap another NICI encryption key. - #define NE_XFLM_NOT_EXPECTING_PASSWORD XFLM_ERROR_BASE( 0x3116) // Password supplied when none was expected. - #define NE_XFLM_EXPECTING_PASSWORD XFLM_ERROR_BASE( 0x3117) // No password supplied when one was required. - #define NE_XFLM_EXTRACT_KEY_FAILED XFLM_ERROR_BASE( 0x3118) // Error occurred while attempting to extract a NICI encryption key. - #define NE_XFLM_NICI_INIT_FAILED XFLM_ERROR_BASE( 0x3119) // Error occurred while initializing NICI. - #define NE_XFLM_BAD_ENCKEY_SIZE XFLM_ERROR_BASE( 0x311A) // Bad encryption key size found in roll-forward log packet. - #define NE_XFLM_ENCRYPTION_UNAVAILABLE XFLM_ERROR_BASE( 0x311B) // Attempt was made to encrypt data when NICI is unavailable. - #define NE_XFLM_LAST_NICI_ERROR XFLM_ERROR_BASE( 0x311C) // NOTE: This is not an error code - do not document + #define NE_XFLM_NICI_CONTEXT 0xD401 // Error occurred while creating NICI context for encryption/decryption. + #define NE_XFLM_NICI_ATTRIBUTE_VALUE 0xD402 // Error occurred while accessing an attribute on a NICI encryption key. + #define NE_XFLM_NICI_BAD_ATTRIBUTE 0xD403 // Value retrieved from an attribute on a NICI encryption key was bad. + #define NE_XFLM_NICI_WRAPKEY_FAILED 0xD404 // Error occurred while wrapping a NICI encryption key in another NICI encryption key. + #define NE_XFLM_NICI_UNWRAPKEY_FAILED 0xD405 // Error occurred while unwrapping a NICI encryption key that is wrapped in another NICI encryption key. + #define NE_XFLM_NICI_INVALID_ALGORITHM 0xD406 // Attempt to use invalid NICI encryption algorithm. + #define NE_XFLM_NICI_GENKEY_FAILED 0xD407 // Error occurred while attempting to generate a NICI encryption key. + #define NE_XFLM_NICI_BAD_RANDOM 0xD408 // Error occurred while generating random data using NICI. + #define NE_XFLM_PBE_ENCRYPT_FAILED 0xD409 // Error occurred while attempting to wrap a NICI encryption key in a password. + #define NE_XFLM_PBE_DECRYPT_FAILED 0xD40A // Error occurred while attempting to unwrap a NICI encryption key that was previously wrapped in a password. + #define NE_XFLM_DIGEST_INIT_FAILED 0xD40B // Error occurred while attempting to initialize the NICI digest functionality. + #define NE_XFLM_DIGEST_FAILED 0xD40C // Error occurred while attempting to create a NICI digest. + #define NE_XFLM_INJECT_KEY_FAILED 0xD40D // Error occurred while attempting to inject an encryption key into NICI. + #define NE_XFLM_NICI_FIND_INIT 0xD40E // Error occurred while attempting to initialize NICI to find information on a NICI encryption key. + #define NE_XFLM_NICI_FIND_OBJECT 0xD40F // Error occurred while attempting to find information on a NICI encryption key. + #define NE_XFLM_NICI_KEY_NOT_FOUND 0xD410 // Could not find the NICI encryption key or information on the NICI encryption key. + #define NE_XFLM_NICI_ENC_INIT_FAILED 0xD411 // Error occurred while initializing NICI to encrypt data. + #define NE_XFLM_NICI_ENCRYPT_FAILED 0xD412 // Error occurred while encrypting data. + #define NE_XFLM_NICI_DECRYPT_INIT_FAILED 0xD413 // Error occurred while initializing NICI to decrypt data. + #define NE_XFLM_NICI_DECRYPT_FAILED 0xD414 // Error occurred while decrypting data. + #define NE_XFLM_NICI_WRAPKEY_NOT_FOUND 0xD415 // Could not find the NICI encryption key used to wrap another NICI encryption key. + #define NE_XFLM_NOT_EXPECTING_PASSWORD 0xD416 // Password supplied when none was expected. + #define NE_XFLM_EXPECTING_PASSWORD 0xD417 // No password supplied when one was required. + #define NE_XFLM_EXTRACT_KEY_FAILED 0xD418 // Error occurred while attempting to extract a NICI encryption key. + #define NE_XFLM_NICI_INIT_FAILED 0xD419 // Error occurred while initializing NICI. + #define NE_XFLM_BAD_ENCKEY_SIZE 0xD41A // Bad encryption key size found in roll-forward log packet. + #define NE_XFLM_ENCRYPTION_UNAVAILABLE 0xD41B // Attempt was made to encrypt data when NICI is unavailable. /**************************************************************************** Dictionary Document Definitions - below are comments that document valid diff --git a/xflaim/util/basictestsrv.cpp b/xflaim/util/basictestsrv.cpp index bbd2dc7..303c10c 100644 --- a/xflaim/util/basictestsrv.cpp +++ b/xflaim/util/basictestsrv.cpp @@ -961,8 +961,7 @@ Exit: if( RC_BAD( rc)) { - f_sprintf( szMsgBuf, "Error %04X -- %s\n", (unsigned)rc, - m_pDbSystem->errorString( rc)); + f_sprintf( szMsgBuf, "Error 0x%04X\n", (unsigned)rc); display( szMsgBuf); log( szMsgBuf); diff --git a/xflaim/util/checkdb.cpp b/xflaim/util/checkdb.cpp index ac74061..82f5006 100644 --- a/xflaim/util/checkdb.cpp +++ b/xflaim/util/checkdb.cpp @@ -364,9 +364,7 @@ FSTATIC FLMBOOL CheckDatabase( void) gv_szRflDir, gv_szPassword, XFLM_ALLOW_LIMITED_MODE, (IF_Db **)&gv_pDb))) { - f_strcpy( szTmpBuf, "Error opening database: "); - f_strcpy( &szTmpBuf[ f_strlen( szTmpBuf)], - dbSystem.errorString( rc)); + f_sprintf( szTmpBuf, "Error opening database: 0x%04X", (unsigned)rc); CheckShowError( szTmpBuf, TRUE); bOk = FALSE; goto Exit; @@ -593,8 +591,7 @@ FSTATIC FLMBOOL CheckDatabase( void) } else { - f_strcpy( szTmpBuf, "RETURN CODE: "); - f_strcpy( &szTmpBuf[ f_strlen( szTmpBuf)], dbSystem.errorString( rc)); + f_sprintf( szTmpBuf, "RETURN CODE: 0x%04X", (unsigned)rc); } uiStatus = CheckShowError( szTmpBuf, TRUE); @@ -666,8 +663,7 @@ FSTATIC FLMBOOL DoCheck( void) } else { - f_strcpy( szTmpBuf, "Error creating log file: "); - f_strcpy( &szTmpBuf[ f_strlen( szTmpBuf)], dbSystem.errorString( rc)); + f_sprintf( szTmpBuf, "Error creating log file: 0x%04X", (unsigned)rc); CheckShowError( szTmpBuf, FALSE); bOk = FALSE; goto Exit; diff --git a/xflaim/util/domedit.cpp b/xflaim/util/domedit.cpp index e60a5e0..794e7a1 100644 --- a/xflaim/util/domedit.cpp +++ b/xflaim/util/domedit.cpp @@ -257,7 +257,7 @@ void UIMain( void * pData) { FTXDisplayMessage( pScreen, WPS_RED, WPS_WHITE, "This Utility Has Expired", - F_DbSystem::_errorString( RC_SET( NE_XFLM_ILLEGAL_OP)), &uiDummy); + "NE_XFLM_ILLEGAL_OP", &uiDummy); f_sleep( 5000); iResCode = 1; goto Exit; @@ -273,9 +273,11 @@ void UIMain( void * pData) if( RC_BAD( rc = dbSystem.dbOpen( gv_szDbPath, NULL, gv_szRflDir, (IF_Db **)&pDb, gv_szPassword, gv_bAllowLimited))) { + char szErr [20]; + + f_sprintf( szErr, "Error=0x%04X", (unsigned)rc); FTXDisplayMessage( pScreen, WPS_RED, WPS_WHITE, - "Unable to open the database", - dbSystem.errorString( rc), &uiDummy); + "Unable to open the database", szErr, &uiDummy); iResCode = 1; goto Exit; } @@ -285,9 +287,11 @@ void UIMain( void * pData) if( RC_BAD( rc = dbSystem.dbOpen( szDbPath, NULL, gv_szRflDir, (IF_Db **)&pDb, gv_szPassword, gv_bAllowLimited))) { + char szErr [20]; + + f_sprintf( szErr, "Error=0x%04X", (unsigned)rc); FTXDisplayMessage( pScreen, WPS_RED, WPS_WHITE, - "Unable to open the database", - F_DbSystem::_errorString( rc), &uiDummy); + "Unable to open the database", szErr, &uiDummy); iResCode = 1; goto Exit; } diff --git a/xflaim/util/fdomedt.cpp b/xflaim/util/fdomedt.cpp index ff18b6d..78729c1 100644 --- a/xflaim/util/fdomedt.cpp +++ b/xflaim/util/fdomedt.cpp @@ -2956,6 +2956,9 @@ RCODE F_DomEditor::displayMessage( FLMUINT uiForeground) { RCODE rc = NE_XFLM_OK; + char szErr [20]; + + f_sprintf( szErr, "Error=0x%04X", (unsigned)rcOfMessage); flmAssert( m_bSetupCalled == TRUE); @@ -2965,8 +2968,7 @@ RCODE F_DomEditor::displayMessage( } FTXDisplayMessage( m_pScreen, m_bMonochrome ? WPS_LIGHTGRAY : uiBackground, - m_bMonochrome ? WPS_BLACK : uiForeground, - pszMessage, F_DbSystem::_errorString( rcOfMessage), puiTermChar); + m_bMonochrome ? WPS_BLACK : uiForeground, szErr, puiTermChar); return( rc); } diff --git a/xflaim/util/flmunittest.h b/xflaim/util/flmunittest.h index b50225e..de3c1d4 100644 --- a/xflaim/util/flmunittest.h +++ b/xflaim/util/flmunittest.h @@ -59,8 +59,8 @@ flmAssert( 0) #define MAKE_FLM_ERROR_STRING( str, buf, rcode) \ - f_sprintf( buf, str" "#rcode" == %X : %s. file: %s. line: %u.", \ - (unsigned)rcode, m_pDbSystem->errorString( rcode), __FILE__, __LINE__); \ + f_sprintf( buf, str" "#rcode" == 0x%04X. file: %s. line: %u.", \ + (unsigned)rcode, __FILE__, __LINE__); \ flmAssert( 0); #define MAKE_GENERIC_ERROR_STRING( str, buf, num) \ diff --git a/xflaim/util/fshell.cpp b/xflaim/util/fshell.cpp index 8ed28f7..b03f499 100644 --- a/xflaim/util/fshell.cpp +++ b/xflaim/util/fshell.cpp @@ -2944,8 +2944,8 @@ RCODE F_LocalRestoreStatus::reportError( FTXWinSetCursorPos( pWin, 0, 6); FTXWinClearToEOL( pWin); - FTXWinPrintf( pWin, "Error: %s. Retry (Y/N): ", - F_DbSystem::_errorString( (RCODE)rcErr)); + FTXWinPrintf( pWin, "Error: 0x%04X. Retry (Y/N): ", + (unsigned)rcErr); if( FTXWinInputChar( pWin, &uiChar) != FTXRC_SUCCESS) { uiChar = 0; @@ -5461,8 +5461,8 @@ RetryLoad: { if( rc != NE_XFLM_EOF_HIT) { - pShell->con_printf( "Error importing: %s ... %s\n", - szTmpPath, F_DbSystem::_errorString( rc)); + pShell->con_printf( "Error importing: %s ... 0x%04X\n", + szTmpPath, (unsigned)rc); if( pImportStats) { diff --git a/xflaim/util/rebuild.cpp b/xflaim/util/rebuild.cpp index 03b68b3..6f50aac 100644 --- a/xflaim/util/rebuild.cpp +++ b/xflaim/util/rebuild.cpp @@ -289,9 +289,8 @@ FSTATIC FLMBOOL bldDoRebuild( void) } else { - f_strcpy( szErrMsg, "Error creating log file: "); - f_strcpy( &szErrMsg[ f_strlen( szErrMsg)], - dbSystem.errorString( rc)); + f_sprintf( szErrMsg, "Error creating log file: 0x%04X", + (unsigned)rc); bldShowError( szErrMsg); bOk = FALSE; goto Exit; @@ -303,9 +302,8 @@ FSTATIC FLMBOOL bldDoRebuild( void) if (RC_BAD( rc = dbSystem.setHardMemoryLimit( 0, FALSE, 0, gv_uiCacheSize * 1024, 0, FALSE))) { - f_strcpy( szErrMsg, "Error setting cache size for FLAIM share: "); - f_strcpy( &szErrMsg[ f_strlen( szErrMsg)], - dbSystem.errorString( rc)); + f_sprintf( szErrMsg, "Error setting cache size for FLAIM share: 0x%04X", + (unsigned)rc); bldShowError( szErrMsg); bOk = FALSE; goto Exit; @@ -429,9 +427,8 @@ FSTATIC void bldShowResults( { f_strcpy( szErrMsg, "Error calling "); f_strcpy( &szErrMsg[ f_strlen( szErrMsg)], pszFuncName); - f_strcpy( &szErrMsg[ f_strlen( szErrMsg)], ": "); - f_strcpy( &szErrMsg[ f_strlen( szErrMsg)], - dbSystem.errorString( rc)); + f_sprintf( &szErrMsg[ f_strlen( szErrMsg)], ": 0x%04X", + (unsigned)rc); bldShowError( szErrMsg); if( gv_bLoggingEnabled) { diff --git a/xflaim/util/rfltestsrv.cpp b/xflaim/util/rfltestsrv.cpp index adf9342..42dd99b 100644 --- a/xflaim/util/rfltestsrv.cpp +++ b/xflaim/util/rfltestsrv.cpp @@ -331,8 +331,7 @@ Exit: if( RC_BAD( rc)) { - f_sprintf( szMsgBuf, "Error %04X -- %s\n", (unsigned)rc, - m_pDbSystem->errorString( rc)); + f_sprintf( szMsgBuf, "Error 0x%04X\n", (unsigned)rc); display( szMsgBuf); log( szMsgBuf); diff --git a/xflaim/util/view.cpp b/xflaim/util/view.cpp index 51274b3..c5cf4ff 100644 --- a/xflaim/util/view.cpp +++ b/xflaim/util/view.cpp @@ -644,8 +644,7 @@ Path_Not_Found: else { Other_Error: - f_strcpy( szTBuf, "Error opening file: "); - f_strcpy( &szTBuf [f_strlen( szTBuf)], F_DbSystem::_errorString( rc)); + f_sprintf( szTBuf, "Error opening file: 0x%04X", (unsigned)rc); if (ViewGetChar( szTBuf, "Open file in DIRECT MODE anyway? (Y/N, Default=Y): ", 'Y') == 'Y') diff --git a/xflaim/util/viewdisp.cpp b/xflaim/util/viewdisp.cpp index 3c4ac27..1cca6f1 100644 --- a/xflaim/util/viewdisp.cpp +++ b/xflaim/util/viewdisp.cpp @@ -66,7 +66,6 @@ void ViewShowRCError( { char szTBuf [100]; - f_sprintf( szTBuf, "Error %s: %s", pszWhat, - F_DbSystem::_errorString( rc)); + f_sprintf( szTBuf, "Error %s: 0x%04X", pszWhat, (unsigned)rc); ViewShowError( szTBuf); }