OTL 4.0, OTL exception class

OTL exception class

This class is used by the OTL functions to raise exceptions. In case if an OTL function receives a non-zero error code from the underlying database API, the OTL function raises an exception of the otl_exception type. A raised otl_exception may be a database error or an OTL defined exception.
class otl_exception {
public:
     char stm_text[2048 or OTL_EXCEPTION_STM_TEXT_SIZE];
     char var_info[256];
#if defined(OTL_UNICODE_EXCEPTION_AND_RLOGON)
OTL_UNICODE_CHAR_TYPE
msg[1000];
#else
     unsigned char msg[1000];
#endif
     
#if defined(OTL_UNICODE_EXCEPTION_AND_RLOGON)
   int arr_len;
     OTL_UNICODE_CHAR_TYPE* msg_arr[];
     OTL_UNICODE_CHAR_TYPE* sqlstate_arr[];
     int code_arr[];
#else
   int arr_len;
     char* msg_arr[];
     char* sqlstate_arr[];
     int code_arr[];
#endif

#if defined(OTL_EXCEPTION_ENABLE_ERROR_OFFSET)
    int error_offset;
#endif
        enum{disabled=0,enabled=1};
}; // end of otl_exception

Prev NextContents Go Home

Copyright © 1996, 2007, Sergei Kuchin, email: skuchin@ispwest.com, skuchin@gmail.com .

Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies.