Go to the source code of this file.
|
int | _matherr (struct _exception *e) |
|
void | WrNotify (const char *CaptionCStr, const char *NotifyCStr) |
|
void | SaveToErrLog (const char *MsgCStr) |
|
void | ExeStop (const char *MsgCStr, const char *ReasonCStr, const char *CondCStr, const char *FNm, const int &LnN) |
|
int _matherr |
( |
struct _exception * |
e | ) |
|
void ExeStop |
( |
const char * |
MsgCStr, |
|
|
const char * |
ReasonCStr, |
|
|
const char * |
CondCStr, |
|
|
const char * |
FNm, |
|
|
const int & |
LnN |
|
) |
| |
Definition at line 90 of file bd.cpp.
93 char ReasonMsgCStr[1000];
101 if (ReasonCStr==NULL){ReasonMsgCStr[0]=0;}
102 else {sprintf(ReasonMsgCStr,
" [Reason:'%s']", ReasonCStr);}
104 char FullMsgCStr[1000];
107 sprintf(FullMsgCStr,
"Execution stopped%s!", ReasonMsgCStr);
109 sprintf(FullMsgCStr,
"Execution stopped: %s%s, file %s, line %d",
110 CondCStr, ReasonMsgCStr, FNm, LnN);
114 sprintf(FullMsgCStr,
"%s\nExecution stopped!", MsgCStr);
116 sprintf(FullMsgCStr,
"Message: %s%s\nExecution stopped: %s, file %s, line %d",
117 MsgCStr, ReasonMsgCStr, CondCStr, FNm, LnN);
123 #if defined(SW_NOABORT)
void ErrNotify(const char *NotifyCStr)
static void Throw(const TStr &MsgStr)
void SaveToErrLog(const char *MsgCStr)
static bool IsOnExeStopF()
static TOnExeStopF GetOnExeStopF()
void SaveToErrLog |
( |
const char * |
MsgCStr | ) |
|
Definition at line 51 of file bd.cpp.
53 char* FNm=
new char[MxFNmLen];
if (FNm==NULL){
return;}
54 int FNmLen=GetModuleFileName(NULL, FNm, MxFNmLen);
if (FNmLen==0){
return;}
55 FNm[FNmLen++]=
'.'; FNm[FNmLen++]=
'E'; FNm[FNmLen++]=
'r'; FNm[FNmLen++]=
'r';
56 FNm[FNmLen++]=char(0);
57 time_t Time=time(NULL);
58 FILE* fOut=fopen(FNm,
"a+b");
if (fOut==NULL){
return;}
59 fprintf(fOut,
"--------\r\n%s\r\n%s%s\r\n--------\r\n",
60 FNm, ctime(&Time), MsgCStr);
void WrNotify |
( |
const char * |
CaptionCStr, |
|
|
const char * |
NotifyCStr |
|
) |
| |
Definition at line 43 of file bd.cpp.
44 #if defined(__CONSOLE__) || defined(_CONSOLE)
45 printf(
"*** %s: %s\n", CaptionCStr, NotifyCStr);
47 MessageBox(NULL, NotifyCStr, CaptionCStr, MB_OK);