Refer to Section 4.2 for the public data members and member functions which are inherited by OCI_Error.
Figure 4-2. class OCI_Error
namespace Oracle
{
struct OCI_Error: public Error
{
// constructors
OCI_Error(
const string&,
OCIError*,
const string& = "",
const int = 0);
// data members
int ora_code;
};
}OCI_Error(const string& module_name, OCIError* error_handle, const string& file_name, const int line_number);
When you throw an OCI_Error object, you specify the module_name and the error_handle, and optionally the file_name and line_number. You may specify the file name and line number using the pre-defined macros __FILE__ and __LINE__.
If you wish to provide addtional information, such as the names and values of local variables, you may write to the desc data member (Section 4.2.2.5) as you would any output stream.
The OCI_Error constructor uses the OCI error handle to find the Oracle error number and message. The msg data member is set to the Oracle error message, and ora_code is set to the error code.
This data member is inherited from the Error class and contains an Oracle error message rather than a value supplied to the constructor.
This is the Oracle error code.