Open CASCADE Technology 7.9.0
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
Standard_DefineException.hxx File Reference
#include <Standard_Type.hxx>

Macros

#define DEFINE_STANDARD_EXCEPTION(C1, C2)
 Defines an exception class C1 that inherits an exception class C2.
 
#define IMPLEMENT_STANDARD_EXCEPTION(C1)
 Obsolete macro, kept for compatibility with old code.
 

Macro Definition Documentation

◆ DEFINE_STANDARD_EXCEPTION

#define DEFINE_STANDARD_EXCEPTION ( C1,
C2 )

Defines an exception class C1 that inherits an exception class C2.

C2 must be Standard_Failure or its ancestor. The macro defines empty constructor, copy constructor and static methods Raise() and NewInstance(). Since Standard_Failure implements class manipulated by handle, DEFINE_STANDARD_RTTI macro is also added to enable RTTI.

When using DEFINE_STANDARD_EXCEPTION in your code make sure you also insert a macro DEFINE_STANDARD_HANDLE(C1,C2) before it.

◆ IMPLEMENT_STANDARD_EXCEPTION

#define IMPLEMENT_STANDARD_EXCEPTION ( C1)

Obsolete macro, kept for compatibility with old code.