Changeset 1395 for trunk/dll/errutil.c
- Timestamp:
- Feb 8, 2009, 2:48:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/errutil.c
r1373 r1395 29 29 05 Jan 08 SHL Renamed from error.c to match errutil.h 30 30 18 Dec 08 SHL Show thread id in DbgMsg 31 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 32 07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error 33 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 31 34 32 35 ***********************************************************************/ … … 40 43 #define INCL_DOSERRORS 41 44 #define INCL_DOSPROCESS // PPIB PTIB 45 #define INCL_LONGLONG 42 46 43 47 #include "errutil.h" 44 48 #include "strutil.h" // GetPString 45 49 #include "fm3str.h" 50 #include "notebook.h" // fErrorBeepOff 46 51 47 52 #pragma data_seg(GLOBAL2) … … 135 140 } 136 141 137 if (strchr(szMsg, ' ') == NULL) 138 strcat(szMsg, " failed"); // Assume simple function name 142 if (strchr(szMsg, ' ') == NULL) { 143 strcat(szMsg, " "); 144 strcat(szMsg, GetPString(IDS_FAILEDTEXT)); // Assume simple function name 145 } 139 146 140 147 DosErrClass(ulRC, &Class, &action, &Locus); … … 185 192 } // Dos_Error 186 193 187 / /== Dos_Error2: report Dos...() error using passed message id ===194 /*== Dos_Error2: report Dos...() error using passed message id === 188 195 189 196 INT Dos_Error2(ULONG mb_type, ULONG ulRC, HWND hwndOwner, … … 192 199 return Dos_Error(mb_type, ulRC, hwndOwner, pszSrcFile, uSrcLineNo, 193 200 GetPString(idMsg)); 194 } // Dos_Error2 201 } // Dos_Error2 */ 195 202 196 203 /** … … 224 231 } 225 232 226 if (strchr(pszBuf, ' ') == NULL) 227 strcat(pszBuf, " failed"); // Assume simple function name 233 if (strchr(pszBuf, ' ') == NULL) { 234 strcat(pszBuf, " "); 235 strcat(pszBuf, GetPString(IDS_FAILEDTEXT)); // Assume simple function name 236 } 228 237 229 238 // Append file name and line number and trailing space … … 303 312 } 304 313 305 if (strchr(szMsg, ' ') == NULL) 306 strcat(szMsg, " failed"); // Assume simple function name 314 if (strchr(szMsg, ' ') == NULL) { 315 strcat(szMsg, " "); 316 strcat(szMsg, GetPString(IDS_FAILEDTEXT)); // Assume simple function name 317 } 307 318 308 319 sprintf(szMsg + strlen(szMsg), 309 320 GetPString(IDS_GENERR1TEXT), pszSrcFile, uSrcLineNo); 310 321 311 showMsg(MB_ICONEXCLAMATION, HWND_DESKTOP, DEBUG_STRING, szMsg, TRUE);322 showMsg(MB_ICONEXCLAMATION, HWND_DESKTOP, GetPString(IDS_DEBUG_STRING), szMsg, TRUE); 312 323 313 324 } // Runtime_Error … … 358 369 if (!hwndOwner) 359 370 hwndOwner = HWND_DESKTOP; 360 361 DosBeep(250, 100);371 if (!fErrorBeepOff) 372 DosBeep(250, 100); 362 373 363 374 return WinMessageBox(HWND_DESKTOP, // Parent … … 386 397 } // Win_Error 387 398 388 / /== Win_Error2: report Win...() error using passed message id ===399 /*== Win_Error2: report Win...() error using passed message id === 389 400 390 401 VOID Win_Error2(HWND hwndErr, HWND hwndOwner, … … 393 404 Win_Error(hwndErr, hwndOwner, pszSrcFile, uSrcLineNo, GetPString(idMsg)); 394 405 395 } // Win_Error2 406 } // Win_Error2 */ 396 407 397 408 /** … … 417 428 fputc('\n', stderr); 418 429 fflush(stderr); 419 420 DosBeep(250, 100);430 if (!fErrorBeepOff) 431 DosBeep(250, 100); 421 432 422 433 } // Win_Error_NoMsgBox
Note:
See TracChangeset
for help on using the changeset viewer.