]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
To handle all kind of the exceptions in the Save functionality
authorapo <apo@opencascade.com>
Thu, 9 Feb 2006 12:57:14 +0000 (12:57 +0000)
committerapo <apo@opencascade.com>
Thu, 9 Feb 2006 12:57:14 +0000 (12:57 +0000)
src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx

index ebf67aeca7c1caa8739666e4af8b3221db0b6e26..728c277a4f4a2988f4b477c71e59b631f9241a50 100644 (file)
@@ -741,6 +741,16 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const TCollection_AsciiString& aUrl,
       _errorCode = "HDFexception ! ";
       return false;
     }
+  catch(std::exception& exc)
+    {
+      _errorCode = const_cast<char*>(exc.what());
+      return false;
+    }
+  catch(...)
+    {
+      _errorCode = "Unknown exception ! ";
+      return false;
+    }
   if (theASCII) { // save file in ASCII format
     HDFascii::ConvertFromHDFToASCII(aUrl.ToCString(), true);
   }