View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012131 | Open CASCADE | OCCT:Foundation Classes | public | 2006-04-07 09:45 | 2012-07-24 22:37 |
Reporter | Assigned To | ||||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Fixed in Version | 6.1.1 | ||||
Summary | 0012131: Improvement of Exception mechanism on Unix and Linux platforms | ||||
Description | Initial idea is IFMT 190 Currently Open CASCADE redefines try and catch operators on UNIX by macros, thus replacing C++ exception handling by emulation based on longjumps. This is needed to be able to handle C signals (like SIGSEGV, FPE etc) in the same syntax as C++ exceptions (which is possible only with longjumps -- see IFMT 91 or report on FIP 1.7 on OCN TC page for details The idea is to eliminate all the mentioned problems by converting signals to true C++ exceptions and making other necessary improvements. Note that we still need to use longjumps to go from signal handler to the place where C++ exception can be raised; this can naturally be the beginning of the try{} block. Unfortunately, we will need to insert explicitly a specific code (macros) converting signal to true exception into every try block that has to handle signals (see Comment for alternative idea how to avoid this that turned to be unfeasible) | ||||
Additional information and documentation updates | Documentation remark, added by ABV 2006-08-09 12:28:05: New features: Improvements: Changes: Implementation of exceptions and signals handling on Linux and UNIX platforms has been changed. Note that existing code involving try {} statements shall be updated (see below). Now exceptions are raised and handled as normal C++ exceptions, not emulated by C longjumps as before. This provides the following advantages over previous version: - Use of OCC library in the program that uses C++ exceptions does not require special work-arounds to provide consistent exception handling - Generic catch(...) with period can be used without conflicting with OCC code (as it was with some implementations of STL) - Exception raised after catch() {} but in the same code block will not be erroneously caught by this catch. Two consequtive try{} catch{} blocks are possible within the same code block. - C++ stack unwinding, with appropriate destruction of objects allocated in the stack, is be performed. However, handling of signals is still performed with longjmp functions (on UNIX and Linux systems). To be able to catch signal as exception, the macro OCC_CATCH _SIGNALS should be inserted in the code. This macro instantiates signal handling object; in case of software signal the execution will return to this point and appropriate exception will be raised from this macro. It is recommended to insert OCC_CATCH_SIGNALS macro as a first statement in every try {} block containing code which may generate signal (for instance, generic try {} blocks catching Standard_Failure). See Foundation Classes User's Guide for more details. Note that this change is controlled by new compiler option OCC_CONVERT_SIGNALS. Old option NO_CXX_EXCEPTIONS is kept for compatibility; it still can be used to provide the same behaviour as in previous versions of OCCT. Modified entities: ** NOTE for ATP: the FDC UG shall be also updated in this regard | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2006-04-07 11:02 |
|
CC | => abv |
2006-04-07 11:08 | bugmaster | Assigned To | bugmaster => pdn |
2006-04-07 11:08 | bugmaster | Status | new => assigned |
2006-04-07 11:08 | bugmaster | Category | => FDC |
2006-04-07 11:08 | bugmaster | Status | assigned => tested |
2006-04-07 11:10 | bugmaster | CC | => imv |
2006-05-23 09:19 | bugmaster | Status | tested => verified |
2006-08-08 17:57 |
|
BugsThisDependsOn | => 13149 |
2007-01-12 14:01 | bugmaster | Status | verified => closed |
2007-01-12 14:01 | bugmaster | Resolution | @0@ => fixed |
2011-08-02 11:23 | bugmaster | Category | OCCT:FDC => OCCT:Foundation Classes |
2012-01-13 16:16 |
|
Description Updated | |
2012-01-13 16:16 |
|
Additional Information Updated | |
2012-07-24 22:35 |
|
Relationship added | related to 0009755 |
2012-07-24 22:37 |
|
Description Updated |