Open CASCADE Technology
7.5.0
|
Standard_OutOfMemory exception is defined explicitly and not by macro DEFINE_STANDARD_EXCEPTION, to avoid necessity of dynamic memory allocations during throwing and stack unwinding: More...
#include <Standard_OutOfMemory.hxx>
Public Member Functions | |
Standard_OutOfMemory (const Standard_CString theMessage=0) | |
Constructor is kept public for backward compatibility. More... | |
Standard_CString | GetMessageString () const override |
Returns error message. More... | |
void | SetMessageString (const Standard_CString aMessage) override |
Sets error message. More... | |
Static Public Member Functions | |
static void | Raise (const Standard_CString theMessage="") |
Raises exception with specified message string. More... | |
static void | Raise (Standard_SStream &theMessage) |
Raises exception with specified message string. More... | |
static Handle< Standard_OutOfMemory > | NewInstance (const Standard_CString theMessage="") |
Returns global instance of exception. More... | |
Protected Attributes | |
char | myBuffer [1024] |
Standard_OutOfMemory exception is defined explicitly and not by macro DEFINE_STANDARD_EXCEPTION, to avoid necessity of dynamic memory allocations during throwing and stack unwinding:
The reason is that in out-of-memory condition any memory allocation can fail, thus use of operator new for allocation of new exception instance is dangerous (can cause recursion until stack overflow, see #24836).
Standard_OutOfMemory::Standard_OutOfMemory | ( | const Standard_CString | theMessage = 0 | ) |
Constructor is kept public for backward compatibility.
|
override |
Returns error message.
|
static |
Returns global instance of exception.
|
static |
Raises exception with specified message string.
|
static |
Raises exception with specified message string.
|
override |
Sets error message.
|
protected |