Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Macros
Standard_DefineException.hxx File Reference
#include <Standard_SStream.hxx>
#include <memory>

Macros

#define DEFINE_STANDARD_EXCEPTION(C1, C2)
 Defines an exception class inheriting from Standard_Failure.
 

Macro Definition Documentation

◆ DEFINE_STANDARD_EXCEPTION

#define DEFINE_STANDARD_EXCEPTION ( C1,
C2 )
Value:
class C1 : public C2 \
{ \
public: \
C1(const char* theMessage = "") \
{ \
} \
C1(const char* theMessage, const char* theStackTrace) \
{ \
} \
\
const char* ExceptionType() const noexcept override \
{ \
return #C1; \
} \
};
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
NCollection_ForwardRangeIterator(HostType *theHost)
Construct from a pointer to the host iterator.
Definition NCollection_ForwardRange.hxx:156

Defines an exception class inheriting from Standard_Failure.

This macro creates a complete exception class with:

  • Constructors that forward to base class
  • ExceptionType() override returning the class name

Usage:

#define DEFINE_STANDARD_EXCEPTION(C1, C2)
Defines an exception class inheriting from Standard_Failure.
Definition Standard_DefineException.hxx:34
Parameters
C1Name of the exception class to define
C2Name of the parent exception class (must be Standard_Failure or derived)