0026937: Eliminate NO_CXX_EXCEPTION macro support
[occt.git] / src / Standard / Standard_Failure.hxx
index e3a9bb4..13f62d2 100644 (file)
@@ -103,6 +103,7 @@ public:
   //! Returns the last caught exception.
   //! Needed when exceptions are emulated by C longjumps,
   //! in other cases is also provided for compatibility.
+  Standard_DEPRECATED("This method is deprecated (not thread-safe), use standard C++ mechanism instead")
   Standard_EXPORT static Handle(Standard_Failure) Caught();
 
 
@@ -135,4 +136,11 @@ inline Standard_OStream& operator << (Standard_OStream& AStream,
   return AStream;
 }
 
+inline Standard_OStream& operator << (Standard_OStream& AStream,
+                                      const Standard_Failure& AFailure)
+{
+  AFailure.Print(AStream);
+  return AStream;
+}
+
 #endif // _Standard_Failure_HeaderFile