From: apo Date: Thu, 9 Feb 2006 12:57:14 +0000 (+0000) Subject: To handle all kind of the exceptions in the Save functionality X-Git-Tag: Tag_09032006~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ebc409575e1818cf14b888d914a6ef93cb95ec65;p=modules%2Fkernel.git To handle all kind of the exceptions in the Save functionality --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index ebf67aeca..728c277a4 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -741,6 +741,16 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const TCollection_AsciiString& aUrl, _errorCode = "HDFexception ! "; return false; } + catch(std::exception& exc) + { + _errorCode = const_cast(exc.what()); + return false; + } + catch(...) + { + _errorCode = "Unknown exception ! "; + return false; + } if (theASCII) { // save file in ASCII format HDFascii::ConvertFromHDFToASCII(aUrl.ToCString(), true); }