This is the exception to throw when an error occurs in a UDR. More...
#include <sqludr.h>
Public Member Functions | |
UDRException (int sqlState, const char *printf_format,...) | |
UDRException (const char *sqlState, const char *printf_format,...) | |
const char * | getSQLState () const |
const std::string & | getMessage () const |
const std::string & | getText () const |
This is the exception to throw when an error occurs in a UDR.
The SQLState value must be a value between 38000 and 38999, since the SQL standard reserves SQLState class 38 for user-written code. SQLState values 38950 to 38999 are reserved for use by Trafodion code. Trafodion will produce SQL error code -11252 when this exception is thrown.
UDRException::UDRException | ( | int | sqlState, | |
const char * | printf_format, | |||
... | ||||
) |
Constructor with an integer value for SQLSTATE
sqlState | ISO/ANSI SQLSTATE value to produce for this error. According to the standard, this must be a value in the range of 38000 - 38999 (note that since we use an integer, non-numeric SQLSTATE values cannot be generated. | |
printf_format | a format string like it is used in printf, with a variable list of arguments to be substituted. Example: new UDRException(38001, "num %d, string %s", 1, "a"); |
UDRException::UDRException | ( | const char * | sqlState, | |
const char * | printf_format, | |||
... | ||||
) |
Constructor with a string value for SQLSTATE
sqlState | ISO/ANSI SQLSTATE value to produce for this error. According to the standard, this must be a value of the form 38xxx, with the xxx being digits or upper case letters. | |
printf_format | a format string like it is used in printf, with a variable list of arguments to be substituted. |
const std::string & UDRException::getMessage | ( | ) | const |
Get the error message associated with this exception
const char * UDRException::getSQLState | ( | ) | const |
Get the SQSTATE value for this exception
const std::string & UDRException::getText | ( | ) | const |
Get the error message associated with this exception