![]() |
Open CASCADE Technology Reference Manual 8.0.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 char *const theMessage=nullptr) | |
| Constructor is kept public for backward compatibility. | |
| const char * | what () const noexcept override |
| Returns error message (implements std::exception interface). | |
| const char * | ExceptionType () const noexcept override |
| Returns the exception type name. | |
| void | SetMessageString (const char *const theMessage) |
| Sets error message. | |
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).
Constructor is kept public for backward compatibility.
| theMessage | optional error message |
|
inlineoverridenoexcept |
Returns the exception type name.
Sets error message.
| theMessage | error message (can be nullptr) |
|
overridenoexcept |
Returns error message (implements std::exception interface).