Changeset 453 for branches/branch-1-0/src/helpers/except.c
- Timestamp:
- Jun 23, 2023, 11:24:37 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1-0/src/helpers/except.c
r431 r453 468 468 ulOffset = -1; 469 469 ULONG ul; 470 471 470 ULONG ulOldPriority = 0x0100; // regular, delta 0 471 PSZ pszExp = "\nExplanation: %s\n %s\n"; 472 472 473 473 // raise global flag for whether this func is running … … 528 528 pcszVersion); 529 529 530 531 // generic exception info532 fprintf(file,533 "\n%s:\n Exception type: %08lX\n Address: %08lX\n Params: ",534 pszHandlerName,535 pReportRec->ExceptionNum,536 (ULONG)pReportRec->ExceptionAddress);537 for (ul = 0; ul < pReportRec->cParameters; ul++)538 {539 fprintf(file, "%08lX ",540 pReportRec->ExceptionInfo[ul]);541 }542 530 543 531 // now explain the exception in a bit more detail; … … 565 553 pContextRec->ctx_SegDs, 566 554 pReportRec->ExceptionInfo[1]); 567 fprintf(file, 568 "Explanation: An attempt was made to access a memory object which does\n" 569 " not belong to the current process. Most probable causes\n" 570 " for this are that an invalid pointer was used, there was\n" 571 " confusion with administering memory or error conditions \n" 572 " were not properly checked for.\n"); 555 fprintf(file, pszExp, 556 "An attempt was made to access a memory object which does", 557 "not belong to the current process."); 573 558 break; 574 559 575 560 case XCPT_INTEGER_DIVIDE_BY_ZERO: 576 561 fprintf(file, "\nXCPT_INTEGER_DIVIDE_BY_ZERO.\n"); 577 fprintf(file, 578 " Explanation: An attempt was made to divide an integer value by zero,\n"579 " which is not defined.\n");562 fprintf(file, pszExp, 563 "An attempt was made to divide an integer value by zero," 564 "which is not defined."); 580 565 break; 581 566 582 567 case XCPT_ILLEGAL_INSTRUCTION: 583 568 fprintf(file, "\nXCPT_ILLEGAL_INSTRUCTION.\n"); 584 fprintf(file, 585 " Explanation: An attempt was made to execute an instruction that\n"586 " is not defined on this machine's architecture.\n");569 fprintf(file, pszExp, 570 "An attempt was made to execute an instruction that", 571 "is not defined on this machine's architecture."); 587 572 break; 588 573 589 574 case XCPT_PRIVILEGED_INSTRUCTION: 590 575 fprintf(file, "\nXCPT_PRIVILEGED_INSTRUCTION.\n"); 591 fprintf(file, 592 "Explanation: An attempt was made to execute an instruction that\n" 593 " is not permitted in the current machine mode or that\n" 594 " the program had no permission to execute.\n"); 576 fprintf(file, pszExp, 577 "An attempt was made to execute an instruction that", 578 "the program does not have permission to use."); 595 579 break; 596 580 597 581 case XCPT_INTEGER_OVERFLOW: 598 582 fprintf(file, "\nXCPT_INTEGER_OVERFLOW.\n"); 599 fprintf(file, 600 "Explanation: An integer operation generated a carry-out of the most\n" 601 " significant bit. This is a sign of an attempt to store\n" 602 " a value which does not fit into an integer variable.\n"); 583 fprintf(file, pszExp, 584 "An integer operation generated a carry out of the most" 585 "significant bit."); 603 586 break; 604 587 605 588 default: 606 589 fprintf(file, "\nUnknown OS/2 exception number %d.\n", pReportRec->ExceptionNum); 607 fprintf(file, "Look this up in the OS/2 header files.\n");608 590 break; 609 591 } 592 593 // generic exception info 594 fprintf(file, 595 "\n%s:\n Exception type: %08lX\n Address: %08lX\n Params: ", 596 pszHandlerName, 597 pReportRec->ExceptionNum, 598 (ULONG)pReportRec->ExceptionAddress); 599 for (ul = 0; ul < pReportRec->cParameters; ul++) 600 { 601 fprintf(file, "%08lX ", 602 pReportRec->ExceptionInfo[ul]); 603 } 604 fputs("\n", file); 605 610 606 611 607 // V0.9.16 (2001-11-02) [pr]: We already got this info. above - this overwrites the
Note:
See TracChangeset
for help on using the changeset viewer.