]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
abort on Standard_Failure::Caught: failure is sometimes null. Deprecated, use standar...
authorPaul RASCLE <paul.rascle@openfields.fr>
Sat, 14 Nov 2020 16:25:41 +0000 (17:25 +0100)
committerYOANN AUDOUIN <B61570@dsp0919998.atlas.edf.fr>
Fri, 4 Dec 2020 10:01:08 +0000 (11:01 +0100)
src/HYDROGUI/HYDROGUI_CalculationOp.cxx
src/HYDROGUI/HYDROGUI_ExportCalculationOp.cxx
src/HYDROGUI/HYDROGUI_Operation.cxx
src/HYDROGUI/HYDROGUI_StreamOp.cxx

index 3a69f8c344b432e87447576725f4c5ab2370a008..ebf31719c252b92dacd9609354d82070f6d438d3 100644 (file)
@@ -825,10 +825,9 @@ void HYDROGUI_CalculationOp::onApply()
   {
     aResult = processApply( anUpdateFlags, anErrorMsg, aBrowseObjectsEntries );
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure& e )
   {
-    Handle(Standard_Failure) aFailure = Standard_Failure::Caught();
-    anErrorMsg = aFailure->GetMessageString();
+    anErrorMsg = e.GetMessageString();
     aResult = false;
   }
   catch ( ... )
index b024f3b5e30460526c236e0e4b6b26ab4620d7b4..94a7cb481613a81e36e77d4b07f2812ea8fde7c3 100644 (file)
@@ -111,10 +111,9 @@ void HYDROGUI_ExportCalculationOp::onApply()
   try {
     aResult = processApply( anUpdateFlags, anErrorMsg, aBrowseObjectsEntries );
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure& e )
   {
-    Handle(Standard_Failure) aFailure = Standard_Failure::Caught();
-    anErrorMsg = aFailure->GetMessageString();
+    anErrorMsg = e.GetMessageString();
     aResult = false;
   }
   catch ( ... )
index f95f891f9d1fb1661052f855ebcf4eacbeda24b5..2cecdcdea3e14ba129d4f7894754a26771a84b02 100644 (file)
@@ -250,11 +250,10 @@ void HYDROGUI_Operation::apply()
   {
     aResult = processApply( anUpdateFlags, anErrorMsg, aBrowseObjectsEntries );
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure& e )
   {
-    Handle(Standard_Failure) aFailure = Standard_Failure::Caught();
-    if (aFailure)
-      anErrorMsg = aFailure->GetMessageString();
+    if (&e)
+      anErrorMsg = e.GetMessageString();
     else
       anErrorMsg = "failure unknown: catch ( Standard_Failure ) does not give access to failure!";
     aResult = false;
index 14db0d12a1695cfa4fdadfb095c37e331b9e9bee..89a5186da319eb50a994452bd0b84fb1adce9984 100755 (executable)
@@ -243,10 +243,9 @@ void HYDROGUI_StreamOp::apply()
   {
     aResult = processApply( anUpdateFlags, anErrorMsg, aBrowseObjectsEntries );
   }
-  catch ( Standard_Failure )
+  catch ( Standard_Failure& e )
   {
-    Handle(Standard_Failure) aFailure = Standard_Failure::Caught();
-    anErrorMsg = aFailure->GetMessageString();
+    anErrorMsg = e.GetMessageString();
     aResult = false;
   }
   catch ( ... )