Salome HOME
bos #24596 [CEA] New MeshGems license
[modules/smesh.git] / src / SMESHUtils / SMESH_TryCatch.cxx
index 1c5044f0c0d5661d67191cc91c0158126e33f1ad..48ebcdee27f3e443318b666c0a66183278951770 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -39,6 +39,15 @@ const char* SMESH::returnError(const char* txt)
   return txt;
 }
 
+void SMESH::printErrorInDebugMode(const char* txt)
+{
+#ifdef _DEBUG_
+  std::cerr <<  txt << " " << __FILE__ << ": " << __LINE__ << std::endl;
+#else
+  (void)txt; // unused in release mode
+#endif
+}
+
 // ------------------------------------------------------------------
 
 #include "SMESH_ComputeError.hxx"