Open CASCADE Technology 7.8.0
|
Class implementing mechanics of conversion of signals to exceptions. More...
#include <Standard_ErrorHandler.hxx>
Data Structures | |
class | Callback |
Defines a base class for callback objects that can be registered in the OCC error handler (the class simulating C++ exceptions) so as to be correctly destroyed when error handler is activated. More... | |
Public Member Functions | |
Standard_ErrorHandler () | |
Create a ErrorHandler (to be used with try{}catch(){}). It uses the "setjmp" and "longjmp" routines. | |
void | Destroy () |
Unlinks and checks if there is a raised exception. | |
~Standard_ErrorHandler () | |
Destructor. | |
void | Unlink () |
Removes handler from the handlers list. | |
Standard_Boolean | Catches (const Handle< Standard_Type > &aType) |
Returns "True" if the caught exception has the same type or inherits from "aType". | |
Standard_JmpBuf & | Label () |
Returns label for jump. | |
Handle< Standard_Failure > | Error () const |
Returns the current Error. | |
Static Public Member Functions | |
static Handle< Standard_Failure > | LastCaughtError () |
Returns the caught exception. | |
static Standard_Boolean | IsInTryBlock () |
Test if the code is currently running in a try block. | |
Class implementing mechanics of conversion of signals to exceptions.
Each instance of it stores data for jump placement, thread id, and callbacks to be called during jump (for proper resource release).
The active handlers are stored in the global stack, which is used to find appropriate handler when signal is raised.
Standard_ErrorHandler::Standard_ErrorHandler | ( | ) |
Create a ErrorHandler (to be used with try{}catch(){}). It uses the "setjmp" and "longjmp" routines.
|
inline |
Destructor.
Standard_Boolean Standard_ErrorHandler::Catches | ( | const Handle< Standard_Type > & | aType | ) |
Returns "True" if the caught exception has the same type or inherits from "aType".
void Standard_ErrorHandler::Destroy | ( | ) |
Unlinks and checks if there is a raised exception.
Handle< Standard_Failure > Standard_ErrorHandler::Error | ( | ) | const |
Returns the current Error.
|
static |
Test if the code is currently running in a try block.
|
inline |
Returns label for jump.
|
static |
Returns the caught exception.
void Standard_ErrorHandler::Unlink | ( | ) |
Removes handler from the handlers list.