IFR_ErrorHndl.dxy

Go to the documentation of this file.
00001 #include <string.h>
00002 #include <stdarg.h>
00003 #include <stdio.h>
00004 
00005 #include "SAPDBCommon/SAPDB_ReuseLib.h"
00006 #include "Interfaces/Runtime/IFR_ErrorHndl.h"
00007 #include "Interfaces/Runtime/IFR_Trace.h"
00008 
00009 #include "SAPDB/SAPDBCommon/ErrorsAndMessages/SAPDBErr_MessageList.hpp"
00010 
00011 #ifndef Msg_List
00012 #  define Msg_List SAPDBErr_MessageList
00013 #endif
00014 
00035 static IFR_ErrorData errordata[] =
00036 {
00037     { IFR_ERR_UNKNOWN,                 -10899,     "",     "Unknown error"    },
00038     //**********************************************************************
00039     //******** Environment, Tracing, Filehandling 10000 - 10099 *********
00040 
00041     { IFR_ERR_ALLOCSHMEM_FAILED_SI,              -10803,  "",     "Allocation of shared memory failed \"%s\" of size %d failed" },
00042     { IFR_ERR_ALLOCSHMEM_FAILED_S,               -10803,  "",     "Allocation of shared memory failed (%s)" },
00043     // Use the macro IFR_ERR_NOT_IMPLEMENTED(x)
00044     { IFR_ERR_NOT_IMPLEMENTED_SSI,               -10808,  "",    "Feature (%s) not implemented yet in module: %s line: %d" },
00045     { IFR_ERR_SYSTEM_ERROR_S,                    -10001,  "",    "System error: %s." },
00046     { IFR_ERR_WRONG_KERNEL_VERSION_I,            -10003,  "",    "Feature not supported for kernel version %d" },
00047     { IFR_ERR_SESSION_ALREADY_IN_USE,            -10810,  "",    "Session already in use" },
00048     //**********************************************************************
00049     //******** Connection 10100 - 10199 *********
00050 
00051     { IFR_ERR_CONNECTION_DOWN_IIS,               -10807,  "",     "Connection down: [%d] %.*s"  },
00052     { IFR_ERR_SERVERDB_MISSING,                  -10857,  "",     "Missing database name for connection" },
00053     { IFR_ERR_USERNAME_MISSING,                  -10715,  "",     "Missing user name for connection" },
00054     { IFR_ERR_PASSWORD_MISSING,                  -10715,  "",     "Missing password for connection" },
00055     { IFR_ERR_CONNECTFAILED_INTERNAL_SS,         -10709,  "",     "Connection failed (%s:%s)" },
00056     { IFR_ERR_INVALID_CONNECT_PROPERTY_S,        -10100,  "",     "Invalid value for option \'%s\' of SQLDBC_ConnectProperties" },
00057     { IFR_ERR_INVALID_ISOLATIONLEVEL_S,          -10101,  "",     "Invalid value for ISOLATIONLEVEL (%s)" },
00058     { IFR_ERR_INVALID_ISOLATIONLEVEL_I,          -10101,  "",     "Invalid value for ISOLATIONLEVEL (%d)" },
00059     { IFR_ERR_INVALID_PACKETCOUNT_S,             -10102,  "",     "Invalid value for PACKETCOUNT (%s)" },
00060     { IFR_ERR_INVALID_STATEMENTCACHESIZE_S,      -10103,  "",     "Invalid value for STATEMENTCACHESIZE (%s)" },
00061     { IFR_ERR_INVALID_XUSERKEY,                  -10104,  "",     "Invalid value for KEY" },
00062     { IFR_ERR_XUSER_ERROR_S,                     -10757,  "",     "XUSER error (%s)"},
00063 
00064     //***********************************************************
00065     //******** API handling 10200 - 10299               *********
00066 
00067     { IFR_ERR_SQLCMD_DATA_EXPECTED,              -10200, "HY010", "Function sequence error (data for execution expected)" },
00068     { IFR_ERR_SQLCMD_NO_DATA_EXPECTED,           -10201, "HY010", "Function sequence error (no data for execution expected)" },
00069     { IFR_ERR_SQLCMD_RECONNECT,                  -10202, "HY010", "Function sequence error (operation was aborted by disconnect)" },
00070     { IFR_ERR_SQLCMD_NOTPREPARED,                -10210, "HY010", "Invalid command state (No prepared SQL command)" },
00071     { IFR_ERR_METHOD_NOT_ALLOWED,                -10220, "HY010", "Calling %s is not allowed for %s." },
00072     { IFR_ERR_COMMAND_INFO_TOOLONG,              -10221, "HY010", "Command info to long [length is %d maximum length %d]" },
00073 
00074     //***********************************************************
00075     //******** Parameter, Column handling 10300 - 10399 *********
00076     { IFR_ERR_INVALID_PARAMETERINDEX,            -10300, "07009", "Invalid parameter index" },
00077     { IFR_ERR_INVALID_PARAMETERINDEX_I,          -10300, "07009", "Invalid parameter index %d" },
00078     { IFR_ERR_PARAMETERINDEX_NULL,               -10300, "07009", "Invalid parameter index 0" },
00079     { IFR_ERR_INVALID_HOSTTYPE_SI,               -10301, ""     , "Invalid host type (%s) for parameter (%d)" },
00080     { IFR_ERR_PARAMETER_NOT_SET_I,               -10304, "07002", "Parameter/Column (%d) not bound." },
00081     { IFR_ERR_NULL_PARAMETERADDR_I,              -10305, "HY090", "Parameter (%d) contains null pointer" },
00082     { IFR_ERR_NEGATIVE_BUFFERLEN_I,              -10306, "HY090", "Negative buffer length for parameter (%d) not allowed" },
00083     { IFR_ERR_INVALID_LENGTHINDICATOR_I,         -10307, "HY090", "Invalid length or indicator value for parameter (%d)" },
00084     { IFR_ERR_NOPIECEWISE_DATA_WRITE_I,          -10308, "HY019", "Non-character and non-binary data for parameter (%d) for piece wise insert not allowed" },
00085 
00086     { IFR_ERR_INVALID_COLUMNINDEX_I,             -10310, "07009", "Invalid column index (%d)" },
00087     { IFR_ERR_NONULLDATAAPPEND_I,                -10312, "HY020", "Attempt to concatenate to a NULL or DEFAULT value for parameter (%d)" },
00088     { IFR_ERR_PARAMETER_ALREADY_PROCESSED_I,     -10313, "HY010", "Requested parameter (%d) was already processed" },
00089     { IFR_ERR_INVALID_PARAMETER_SEQUENCE_I,      -10314, "HY010", "Invalid parameter processing sequence, process"
00090       " non-LONG data before parameter (%d)" },
00091     { IFR_ERR_INVALID_STARTPOSITION_I,           -10315, ""     , "Invalid start position (%d)" },
00092     { IFR_ERR_DATA_AT_EXECUTE_NOT_ALLOWED_I,     -10316, "HY010", "DATA AT EXECUTE for parameter (%d) not allowed (conflicts "
00093       "with use of LOB parameter)" },
00094     { IFR_ERR_LOB_NOT_ALLOWED_I,                 -10317, "HY010", "LOB type for parameter (%d) not allowed (conflicts "
00095       "with use of DATA AT EXECUTE parameter)" },
00096     { IFR_ERR_INVALID_LOB,                       -10318, "HY010", "Invalid LOB object" },
00097     { IFR_ERR_LOB_READONLY_I,                    -10319, "HY010", "Could not read LOB for parameter/column (%d)" },
00098     { IFR_ERR_LOB_WRITEONLY_I,                   -10319, "HY010", "Could not write write LOB for parameter/column (%d)" },
00099     { IFR_ERR_LOB_CLOSED_I,                      -10320, "HY010", "LOB already closed LOB for parameter/column (%d)" },
00100     { IFR_ERR_LOB_INVALID_I,                     -10321, "HY010", "LOB invalidated by a previous error for "
00101       "parameter/column (%d)" },
00102     { IFR_ERR_LOB_NULLDEFAULT_I,                 -10322, "HY010", "Could not insert LOB."
00103       " Parameter/column (%d) has a NULL/DEFAULT value" },
00104     { IFR_ERR_NOPIECEWISE_DATA_READ_I,           -10323, "HY019", "Non-character and non-binary data for parameter/column (%d) was "
00105       "tried to read piecewise" },
00106     { IFR_ERR_NULL_STREAMHANDLE_I,               -10861, "HY010", "Invalid use of null pointer for stream handle in parameter (%d)" },
00107     { IFR_ERR_STREAMHANDLE_NOTFOUND_I,          -10324, "HY010", "Stream with id (%d) not found" },
00108     { IFR_ERR_STREAMHANDLE_NOTINPUT_I,          -10325, "HY010", "Stream parameter (%d) is not an input parameter" },
00109     { IFR_ERR_STREAMHANDLE_NOTOUTPUT_I,         -10325, "HY010", "Stream parameter (%d) is not an input parameter" },
00110     { IFR_ERR_STREAM_ERROR_INPUT_I,             -10862, "HY010", "Stream parameter (%d), error in read procedure" },
00111     { IFR_ERR_STREAM_ERROR_OUTPUT_I,            -10862, "HY010", "Stream parameter (%d), error in write procedure" },
00112     { IFR_ERR_STREAM_NO_DATA_I,                 -10326, "HY010", "No data found for stream (%d), but data was expected" },
00113     { IFR_ERR_NULL_STREAMPARAM_I,               -10327, "HY010", "Invalid use of null pointer in stream parameter field "
00114                                                                  "of stream descriptor for parameter/column (%d)" },
00115     { IFR_ERR_STREAM_MEMBERCOUNT_MISMATCH_III,  -10328, "HY010", "Mismatch of number of stream members for parameter (%d) "
00116       "(application %d, database %d)." },
00117     { IFR_ERR_INVALID_SERIAL_VALUE_TAG,         -10329, "HY010", "Invalid serial value requested, must be first or last value." },
00118     { IFR_ERR_STREAM_OUTPUT_SEQUENCE_ERROR,     -10330, "HY010", "Multiple stream output sequence error." },
00119     { IFR_ERR_STREAM_OVERFLOW_III,              -10331, "HY010", "Input stream callback buffer overflow for table id %d, "
00120       "allowed %d, written %d bytes." },
00121     { IFR_ERR_STREAM_NO_FUNCTION_I,             -10332, "HY010", "No callback function supplied for stream parameter %d." },
00122     //***********************************************************
00123     //******** Data Conversion 10400 - 10499 *********
00124 
00125     { IFR_ERR_PARAM_CONVERSION_LOOSEDIGITS_I,    -10400, "",      "Conversion looses significant digits for parameter/column (%d)" },
00126     { IFR_ERR_PARAM_CONVERSION_TRUNCATEDATA_I,   -10401, "",      "Conversion of parameter/column (%d) would truncate data" },
00127     { IFR_ERR_NUMERIC_OVERFLOW_I,                -10811, "",      "Numeric overflow for parameter/column (%d)" },
00128     { IFR_ERR_INVALID_NUMERIC_VALUE_I,           -10802, "",      "Invalid numeric value for parameter/column (%d)" },
00129     { IFR_ERR_CONVERSION_NOT_SUPPORTED,          -10404, "",      "Conversion not supported" },
00130     { IFR_ERR_CONVERSION_NOT_SUPPORTED_I,        -10404, "",      "Conversion not supported for parameter/column (%d)" },
00131     { IFR_ERR_CORRUPTED_UCS2ASCIIDATA_I,         -10405, ""     , "Cannot convert UCS2 data to ASCII for parameter/column (%d)" },
00132     { IFR_ERR_ODD_DATALENGTH_I,                  -10406, "",      "Invalid data length for UCS2 data for parameter/column (%d)" },
00133     { IFR_ERR_CORRUPTED_UTF8DATA_I,              -10407, ""     , "Corrupted UTF8 data for parameter/column (%d)" },
00134     { IFR_ERR_STRING_CONVERSION,                 -10408, ""     , "Character conversion failed" },
00135     { IFR_ERR_DATETIMEFORMAT_UNSUPPORTED_I,      -10410, "22007", "Date/Time format is not supported for parameter (%d)" },
00136     { IFR_ERR_ILLEGAL_DATE_VALUE_I,              -10411, "",      "Illegal DATE value for parameter/column (%d)" },
00137     { IFR_ERR_ILLEGAL_TIME_VALUE_I,              -10412, "",      "Illegal TIME value for parameter/column (%d)" },
00138     { IFR_ERR_ILLEGAL_TIMESTAMP_VALUE_I,         -10413, "",      "Illegal TIMESTAMP value for parameter/column (%d)" },
00139     { IFR_ERR_BINARY_TO_ENCODED_UNSUPPORTED_I,   -10414, "",      "Conversion from binary value to string is not enabled for "
00140       "parameter/column (%d)" },
00141 
00142     //**********************************************************************
00143     //******** Retrieving results and array commands 10500 - 10599 *********
00144 
00145     { IFR_ERR_ROW_NOT_FOUND,                      100,   "02000", "Row not found" },
00146     { IFR_ERR_RESULTSET_IS_CLOSED,               -10500, "",      "Result set is closed" },
00147     { IFR_ERR_RESULTSET_BEFOREFIRST,             -10501, "S1109", "Invalid position in resultset: before first row" },
00148     { IFR_ERR_RESULTSET_AFTERLAST,               -10502, "S1109", "Invalid position in resultset: after last row" },
00149     { IFR_ERR_RESULTSET_IS_FORWARD_ONLY,         -10503, "",      "The operation is not allowed for result set type FORWARD_ONLY" },
00150     { IFR_ERR_INVALID_ROWSET_POS_I,              -10504, "",      "Invalid position (%d) for rowset" },
00151     { IFR_ERR_ROWSET_IS_READ_ONLY,               -10505, "",      "Result set type is UPDATABLE but row set type is READ_ONLY." },
00152     { IFR_ERR_ROWSET_IS_UPDATABLE,               -10506, "",      "Result set type is READ_ONLY but row set type is UPDATABLE" },
00153     { IFR_ERR_ROWSET_NO_METADATA,                -10507, "",      "Internal error: No metadata available for rowset operation" },
00154     { IFR_ERR_ROWSET_WRONG_COLUMN_ENCODING_I,    -10508, "",      "Invalid encoding of column name for column %d for rowset operation"},
00155     { IFR_ERR_NO_UPDATABLE_ROWSET,               -10509, "",      "The statement was not executed with updatable cursor concurrency" },
00156     { IFR_ERR_INVALID_ROWARRAYSIZE,              -10856, "",      "Invalid row array size 0" },
00157 
00158 
00159     //**********************************************************************
00160     //******** Statement execution 10600 - 10699 *********
00161 
00162     { IFR_ERR_SESSION_NOT_CONNECTED,             -10821,  "",     "Session not connected" },
00163     { IFR_ERR_EMPTY_SQL_STATEMENT,               -10601,  "",     "SQL command is the empty string" },
00164     { IFR_ERR_SQLCMD_NOT_ASCII,                  -10602,  "",     "SQL command contains UNICODE character" },
00165     { IFR_ERR_SQLCMD_RESULTSET,                  -10603,  "",     "SQL command would generate a result set" },
00166     { IFR_ERR_SQLCMD_OUTPUTPARAM,                -10604,  "",     "SQL command contains output parameters" },
00167     { IFR_ERR_STATEMENT_TOOLONG,                 -10706,  "",     "Statement too long" },
00168     { IFR_ERR_SCHEMAMODIFIED,                    -10605,  "",     "Illegal schema modification, parameters/columns have changed type/number incompatibly" },
00169 
00170     //**********************************************************************
00171     //******** Mapped Error codes 10700 - 10899 *********
00172 
00173     // Do not use any new values here. Please check for existing values.
00174 
00175     //**********************************************************************
00176     //******** Fatal errors 10900 - 10999 *********
00177 
00178     { IFR_ERR_PACKET_EXHAUSTED,                  -10901,  "",      "No space left in request packet" },
00179     { IFR_ERR_INVALID_REQUESTPACKET,             -10902,  "",      "Invalid request packet structure" },
00180     { IFR_ERR_MISSINGLONGDATAPART,               -10903,  "",      "Internal Error: LONGDATA part expected" },
00181     { IFR_ERR_MISSINGRESULTCOUNT,                -10904,  "",      "Internal error: Expected result count" },
00182     { IFR_ERR_INVALID_REPLYPACKET,               -10905,  "",      "Invalid reply packet structure" },
00183     { IFR_ERR_INVALID_VALINDEX_I,                -10906,  "",      "Internal Error: Entry for valindex %d not found"},
00184     { IFR_ERR_ERROR_LONGDESCRIPTOR,              -10907,  "",      "Internal Error: Long descriptor has error flag set"},
00185     { IFR_ERR_GETVAL_REQUIRED,                   -10908,  "",      "Internal Error: GETVAL operation required before data could "
00186       "be read"},
00187     //                                           -10909
00188     { IFR_ERR_INVALID_OBJECT,                    SQLDBC_INVALID_OBJECT,  "",      "Invalid object reference" }
00189 #undef EERROR_START
00190 #undef EERROR
00191 };
00192