24,855
社区成员
发帖
与我相关
我的任务
分享
void rlogon(const char* connect_str,const int auto_commit=0)
{
throw_count=0;
retcode=connect_struct.rlogon(connect_str,auto_commit);
if(retcode)
connected=1;
else{
connected=0;
increment_throw_count();
if(get_throw_count()>1)return;
if(otl_uncaught_exception()) return;
OTL_TMPL_EXCEPTION ex(connect_struct);
connect_struct.cleanup();
throw ex;
}
}
otl_tmpl_exception(TConnectStruct& conn_struct, const char* sqlstm=0)
#if defined(__GNUC__) && (__GNUC__>=3)
throw()
#else
OTL_NO_THROW
#endif
{
stm_text[0]=0;
var_info[0]=0;
if(sqlstm){
OTL_STRNCPY_S(OTL_RCAST(char*,stm_text),
sizeof(stm_text),
sqlstm,
sizeof(stm_text)-1);
stm_text[sizeof(stm_text)-1]=0;
}
conn_struct.error(OTL_SCAST(TExceptionStruct&,*this));
OTL_TRACE_EXCEPTION(this->code,this->msg,this->stm_text,this->var_info)
}