Salome HOME
0023505: Sigsegv with fuse on cylinder and cone
[modules/geom.git] / src / STLPlugin / STLPlugin_IOperations.cxx
index 0008bf7790944d4a6d2c637a3098e5d7efdf5c73..20337539d20dc1339a7c756ac030e2bb4dbd8554 100644 (file)
@@ -105,9 +105,8 @@ void STLPlugin_IOperations::ExportSTL( const Handle(GEOM_Object)      theOrigina
       return;
     }
   }
-  catch( Standard_Failure ) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode( aFail->GetMessageString() );
+  catch( Standard_Failure& aFail ) {
+    SetErrorCode( aFail.GetMessageString() );
     return;
   }
 
@@ -162,9 +161,8 @@ STLPlugin_IOperations::ImportSTL( const TCollection_AsciiString& theFileName )
     // Greate material groups.
     // MakeMaterialGroups( anImported, aSeq );
   }
-  catch( Standard_Failure ) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode( aFail->GetMessageString() );
+  catch( Standard_Failure& aFail ) {
+    SetErrorCode( aFail.GetMessageString() );
     return NULL;
   }