Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 #include "Interfaces/Runtime/IFR_TraceContext.h"
00009 
00010 IFR_BEGIN_NAMESPACE
00011 
00034 static IFR_ErrorData errordata[] =
00035 {
00036     { IFR_ERR_UNKNOWN,                 -10899,     "",     "Unknown error"    },
00037     //**********************************************************************
00038     //******** Environment, Tracing, Filehandling 10000 - 10099 *********
00039 
00040     { IFR_ERR_ALLOCSHMEM_FAILED_SI,              -10803, "",      "Allocation of shared memory failed \"%s\" of size %d failed" },
00041     { IFR_ERR_ALLOCSHMEM_FAILED_S,               -10803, "",      "Allocation of shared memory failed (%s)" },
00042     // Use the macro IFR_ERR_NOT_IMPLEMENTED(x)
00043     { IFR_ERR_NOT_IMPLEMENTED_SSI,               -10808, "",      "Feature (%s) not implemented yet in module: %s line: %d" },
00044     { IFR_ERR_SYSTEM_ERROR_S,                    -10001, "",      "System error: %s." },
00045     { IFR_ERR_WRONG_KERNEL_VERSION_I,            -10003, "",      "Feature not supported for kernel version %d" },
00046     { IFR_ERR_SESSION_ALREADY_IN_USE,            -10810, "",      "Session already in use" },
00047     //**********************************************************************
00048     //******** Connection 10100 - 10199 *********
00049 
00050     { IFR_ERR_CONNECTION_DOWN_IIS,               -10807, "",      "Connection down: [%d] %.*s"  },
00051     { IFR_ERR_SERVERDB_MISSING,                  -10857, "",      "Missing database name for connection" },
00052     { IFR_ERR_USERNAME_MISSING,                  -10715, "",      "Missing user name for connection" },
00053     { IFR_ERR_PASSWORD_MISSING,                  -10715, "",      "Missing password for connection" },
00054     { IFR_ERR_CONNECTFAILED_INTERNAL_SS,         -10709, "",      "Connection failed (%s:%s)" },
00055     { IFR_ERR_INVALID_CONNECT_PROPERTY_S,        -10100, "",      "Invalid value for option \'%s\' of SQLDBC_ConnectProperties" },
00056     { IFR_ERR_INVALID_ISOLATIONLEVEL_S,          -10101, "",      "Invalid value for ISOLATIONLEVEL (%s)" },
00057     { IFR_ERR_INVALID_ISOLATIONLEVEL_I,          -10101, "",      "Invalid value for ISOLATIONLEVEL (%d)" },
00058     { IFR_ERR_INVALID_PACKETCOUNT_S,             -10102, "",      "Invalid value for PACKETCOUNT (%s)" },
00059     { IFR_ERR_INVALID_STATEMENTCACHESIZE_S,      -10103, "",      "Invalid value for STATEMENTCACHESIZE (%s)" },
00060     { IFR_ERR_INVALID_XUSERKEY,                  -10104, "",      "Invalid value for KEY" },
00061     { IFR_ERR_INVALID_CLIENTAPPLICATION_S,       -10106, "",      "Invalid client application id (%s)" },
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_II,             -10306, "HY090", "Negative buffer length for parameter (%d) not allowed (found %d)" },
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_S,   -10330, "HY010", "Multiple stream output sequence error, unexpected '%s' part." },
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     { IFR_ERR_UNSUPPORTED_PARAMETERTYPE_I,      -10333, "",      "Unsupported database type in parameter/column (%d)." },
00123     //***********************************************************
00124     //******** Data Conversion 10400 - 10499 *********
00125 
00126     { IFR_ERR_PARAM_CONVERSION_LOOSEDIGITS_I,    -10400, "",      "Conversion looses significant digits for parameter/column (%d)" },
00127     { IFR_ERR_PARAM_CONVERSION_TRUNCATEDATA_I,   -10401, "",      "Conversion of parameter/column (%d) would truncate data" },
00128     { IFR_ERR_NUMERIC_OVERFLOW_I,                -10811, "",      "Numeric overflow for parameter/column (%d)" },
00129     { IFR_ERR_INVALID_NUMERIC_VALUE_I,           -10802, "",      "Invalid numeric value for parameter/column (%d)" },
00130     { IFR_ERR_CONVERSION_NOT_SUPPORTED,          -10404, "",      "Conversion not supported" },
00131     { IFR_ERR_CONVERSION_NOT_SUPPORTED_I,        -10404, "",      "Conversion not supported for parameter/column (%d)" },
00132     { IFR_ERR_CORRUPTED_UCS2ASCIIDATA_I,         -10405, ""     , "Cannot convert UCS2 data to ASCII for parameter/column (%d)" },
00133     { IFR_ERR_ODD_DATALENGTH_I,                  -10406, "",      "Invalid data length for UCS2 data for parameter/column (%d)" },
00134     { IFR_ERR_CORRUPTED_UTF8DATA_I,              -10407, ""     , "Corrupted UTF8 data for parameter/column (%d)" },
00135     { IFR_ERR_STRING_CONVERSION,                 -10408, ""     , "Character conversion failed" },
00136     { IFR_ERR_DATETIMEFORMAT_UNSUPPORTED_I,      -10410, "22007", "Date/Time format is not supported for parameter (%d)" },
00137     { IFR_ERR_ILLEGAL_DATE_VALUE_I,              -10411, "",      "Illegal DATE value for parameter/column (%d)" },
00138     { IFR_ERR_ILLEGAL_TIME_VALUE_I,              -10412, "",      "Illegal TIME value for parameter/column (%d)" },
00139     { IFR_ERR_ILLEGAL_TIMESTAMP_VALUE_I,         -10413, "",      "Illegal TIMESTAMP value for parameter/column (%d)" },
00140     { IFR_ERR_BINARY_TO_ENCODED_UNSUPPORTED_I,   -10414, "",      "Conversion from binary value to string is not enabled for "
00141       "parameter/column (%d)" },
00142     { IFR_ERR_NULL_DECIMAL_INDICATOR_I,          -10415, "",      "Indicator must not be a null pointer for DECIMAL input value "
00143       " for parameter/column (%d)" },
00144     { IFR_ERR_DECIMAL_INDICATOR_CORRUPT_I,       -10416, "",      "Invalid indicator value for DECIMAL input value for "
00145       " paramter/column (%d)" },
00146     { IFR_ERR_INVALID_DECIMAL_SPECIFICATION_III, -10417, "",      "Invalid definition for DECIMAL input value for paramater/column "
00147       " (%d), specified a DECIMAL(%d, %d)" },
00148     { IFR_ERR_DECIMAL_BUFFER_TOO_SHORT_I,        -10418, "",      "Buffer for DECIMAL too short for parameter/column (%d)" },
00149     { IFR_ERR_NOT_ASCII_CHARACTERS_I,            -10419, "",      "Character value contains non-ASCII characters (%d)" },
00150     { IFR_ERR_BYTE_CONVERSION_FAILED_I,          -10420, "",      "Could not convert byte buffer to hexadecimal string for "
00151       "parameter/column (%d)" },
00152     { IFR_ERR_LONG_LONG_I,                       -10421, "",      "Could not convert too large LONG data for parameter/column (%d)" },
00153     { IFR_ERR_BINARY_TO_ENCODED_UNSUPPORTED_I,   -10422, "01004", "Appending data to binary output not supported for parameter/column (%d)" },
00154     { IFR_ERR_BINARY_APPEND_I        ,           -10423, "22003", "Appending data to binary output not supported for numeric parameter/column (%d)" },
00155     { IFR_ERR_BINARY_TRUNCATION_SI,              -10424, "22003", "Conversion from %s data to binary would truncate data for parameter/column (%d)" },
00156 
00157     //**********************************************************************
00158     //******** Retrieving results and array commands 10500 - 10599 *********
00159 
00160     { IFR_ERR_ROW_NOT_FOUND,                      100,   "02000", "Row not found" },
00161     { IFR_ERR_RESULTSET_IS_CLOSED,               -10500, "",      "Result set is closed" },
00162     { IFR_ERR_RESULTSET_BEFOREFIRST,             -10501, "S1109", "Invalid position in resultset: before first row" },
00163     { IFR_ERR_RESULTSET_AFTERLAST,               -10502, "S1109", "Invalid position in resultset: after last row" },
00164     { IFR_ERR_RESULTSET_IS_FORWARD_ONLY,         -10503, "",      "The operation is not allowed for result set type FORWARD_ONLY" },
00165     { IFR_ERR_INVALID_ROWSET_POS_I,              -10504, "",      "Invalid position (%d) for rowset" },
00166     { IFR_ERR_ROWSET_IS_READ_ONLY,               -10505, "",      "Result set type is UPDATABLE but row set type is READ_ONLY." },
00167     { IFR_ERR_ROWSET_IS_UPDATABLE,               -10506, "",      "Result set type is READ_ONLY but row set type is UPDATABLE" },
00168     { IFR_ERR_ROWSET_NO_METADATA,                -10507, "",      "Internal error: No metadata available for rowset operation" },
00169     { IFR_ERR_ROWSET_WRONG_COLUMN_ENCODING_I,    -10508, "",      "Invalid encoding of column name for column %d for rowset operation"},
00170     { IFR_ERR_NO_UPDATABLE_ROWSET,               -10509, "",      "The statement was not executed with updatable cursor concurrency" },
00171     { IFR_ERR_INVALID_ROWARRAYSIZE,              -10856, "",      "Invalid row array size 0" },
00172     { IFR_ERR_NO_DATA_FOR_UPDATE,                -10510, "21S02", "Degree of derived table does not match column list" },
00173 
00174 
00175     //**********************************************************************
00176     //******** Statement execution 10600 - 10699 *********
00177 
00178     { IFR_ERR_SESSION_NOT_CONNECTED,             -10821,  "",     "Session not connected" },
00179     { IFR_ERR_EMPTY_SQL_STATEMENT,               -10601,  "",     "SQL command is the empty string" },
00180     { IFR_ERR_SQLCMD_NOT_ASCII,                  -10602,  "",     "SQL command contains UNICODE character" },
00181     { IFR_ERR_SQLCMD_RESULTSET,                  -10603,  "",     "SQL command would generate a result set" },
00182     { IFR_ERR_SQLCMD_OUTPUTPARAM,                -10604,  "",     "SQL command contains output parameters" },
00183     { IFR_ERR_STATEMENT_TOOLONG,                 -10706,  "",     "Statement too long" },
00184     { IFR_ERR_SCHEMAMODIFIED,                    -10605,  "",     "Illegal schema modification, parameters/columns have changed type/number incompatibly" },
00185 
00186     //**********************************************************************
00187     //******** Mapped Error codes 10700 - 10899 *********
00188 
00189     // Do not use any new values here. Please check for existing values.
00190 
00191     //**********************************************************************
00192     //******** Fatal errors 10900 - 10999 *********
00193 
00194     { IFR_ERR_PACKET_EXHAUSTED,                  -10901,  "",      "No space left in request packet" },
00195     { IFR_ERR_INVALID_REQUESTPACKET,             -10902,  "",      "Invalid request packet structure" },
00196     { IFR_ERR_MISSINGLONGDATAPART,               -10903,  "",      "Internal Error: LONGDATA part expected" },
00197     { IFR_ERR_MISSINGRESULTCOUNT,                -10904,  "",      "Internal error: Expected result count" },
00198     { IFR_ERR_INVALID_REPLYPACKET,               -10905,  "",      "Invalid reply packet structure" },
00199     { IFR_ERR_INVALID_VALINDEX_I,                -10906,  "",      "Internal Error: Entry for valindex %d not found"},
00200     { IFR_ERR_ERROR_LONGDESCRIPTOR,              -10907,  "",      "Internal Error: Long descriptor has error flag set"},
00201     { IFR_ERR_GETVAL_REQUIRED,                   -10908,  "",      "Internal Error: GETVAL operation required before data could "
00202       "be read"},
00203     //                                           -10909
00204     { IFR_ERR_INVALID_OBJECT,                    SQLDBC_INVALID_OBJECT,  "",      "Invalid object reference" }
00205 #undef EERROR_START
00206 #undef EERROR
00207 };
00208 
00209 
00210 
00211 IFR_END_NAMESPACE