Changeset 420 for trunk/src/kernel32/exceptions.cpp
- Timestamp:
- Aug 5, 1999, 3:14:18 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/exceptions.cpp
r413 r420 1 /* $Id: exceptions.cpp,v 1. 8 1999-08-04 14:39:06phaller Exp $ */1 /* $Id: exceptions.cpp,v 1.9 1999-08-05 13:11:38 phaller Exp $ */ 2 2 3 3 /* … … 47 47 #define INCL_MISC 48 48 #define INCL_BASE 49 #define INCL_WINBUTTONS 49 50 #include <os2wrap.h> //Odin32 OS/2 api wrappers 50 51 #include <stdio.h> … … 66 67 67 68 LONG WIN32API UnhandledExceptionFilter(PWINEXCEPTION_POINTERS lpexpExceptionInfo); 69 void KillWin32Process(void); 68 70 69 71 … … 313 315 DWORD rc; 314 316 317 // @@@PH: experimental change to have more control over exception handling 318 #pragma pack(4) 319 typedef struct 320 { 321 ULONG cb; /* Size of fixed part of structure */ 322 HPOINTER hIcon; /* Icon handle */ 323 ULONG cButtons; /* Number of buttons */ 324 ULONG flStyle; /* Icon style flags (MB_ICONQUESTION, etc...)*/ 325 HWND hwndNotify; /* Reserved */ 326 MB2D mb2d[4]; /* Array of button definitions */ 327 } myMB2INFO; 328 #pragma pack() 329 330 myMB2INFO mb2InfoExceptionBox = { 20, // size of structure 331 NULLHANDLE, // icon handle 332 4, // number of buttons 333 MB_ICONHAND, // icon style 334 NULLHANDLE, // reserved 335 { {"continue ~search", 100, BS_PUSHBUTTON | BS_TEXT | BS_AUTOSIZE}, 336 {"continue ~execution", 101, BS_PUSHBUTTON | BS_TEXT | BS_AUTOSIZE}, 337 {"execute ~handler", 102, BS_PUSHBUTTON | BS_TEXT | BS_AUTOSIZE | BS_DEFAULT}, 338 {"~terminate process", 103, BS_PUSHBUTTON | BS_TEXT | BS_AUTOSIZE} } 339 }; 340 315 341 dprintf(("KERNEL32: UnhandledExceptionFilter\n")); 316 342 … … 326 352 lpexpExceptionInfo->ExceptionRecord->ExceptionCode, 327 353 lpexpExceptionInfo->ExceptionRecord->ExceptionAddress); 328 329 WinMessageBox(HWND_DESKTOP, 330 HWND_DESKTOP, 331 message, 332 "Oh, nooo!", 333 0, 334 MB_OK); 335 336 return WINEXCEPTION_EXECUTE_HANDLER; 354 /* 355 rc = WinMessageBox2(HWND_DESKTOP, 356 HWND_DESKTOP, 357 message, 358 "Oh, nooo!", 359 0, 360 (PMB2INFO)&mb2InfoExceptionBox); 361 switch (rc) 362 { 363 case 100: 364 return WINEXCEPTION_CONTINUE_SEARCH; 365 366 case 101: 367 return WINEXCEPTION_CONTINUE_EXECUTION; 368 369 case 102: 370 return WINEXCEPTION_EXECUTE_HANDLER; 371 372 case 103: 373 KillWin32Process(); 374 // fall-through 375 376 default: 377 return WINEXCEPTION_EXECUTE_HANDLER; 378 } 379 */ 380 rc = WinMessageBox(HWND_DESKTOP, 381 HWND_DESKTOP, 382 message, 383 "Oh, nooo!", 384 0, 385 MB_ABORTRETRYIGNORE | MB_ERROR); 386 switch (rc) 387 { 388 case MBID_IGNORE: 389 return WINEXCEPTION_CONTINUE_EXECUTION; 390 391 case MBID_ABORT: 392 KillWin32Process(); 393 // fall-through 394 395 case MBID_RETRY: 396 default: 397 return WINEXCEPTION_EXECUTE_HANDLER; 398 } 337 399 } 338 400
Note:
See TracChangeset
for help on using the changeset viewer.