From ebc409575e1818cf14b888d914a6ef93cb95ec65 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 9 Feb 2006 12:57:14 +0000 Subject: [PATCH] To handle all kind of the exceptions in the Save functionality --- src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); } -- 2.39.2