Warning, file /include/opencascade/Standard_DefineException.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Standard_DefineException_HeaderFile
0015 #define _Standard_DefineException_HeaderFile
0016
0017 #include <Standard_Type.hxx>
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #define DEFINE_STANDARD_EXCEPTION(C1,C2) \
0030 \
0031 class C1 : public C2 { \
0032 void Throw () const Standard_OVERRIDE { throw *this; } \
0033 public: \
0034 C1() : C2() {} \
0035 C1(Standard_CString theMessage) : C2(theMessage) {} \
0036 C1(Standard_CString theMessage, Standard_CString theStackTrace) \
0037 : C2 (theMessage, theStackTrace) {} \
0038 static void Raise(const Standard_CString theMessage = "") { \
0039 Handle(C1) _E = new C1; \
0040 _E->Reraise(theMessage); \
0041 } \
0042 static void Raise(Standard_SStream& theMessage) { \
0043 Handle(C1) _E = new C1; \
0044 _E->Reraise (theMessage); \
0045 } \
0046 static Handle(C1) NewInstance(Standard_CString theMessage = "") { return new C1(theMessage); } \
0047 static Handle(C1) NewInstance(Standard_CString theMessage, Standard_CString theStackTrace) { return new C1(theMessage, theStackTrace); } \
0048 DEFINE_STANDARD_RTTI_INLINE(C1,C2) \
0049 };
0050
0051
0052 #define IMPLEMENT_STANDARD_EXCEPTION(C1)
0053
0054 #endif