Salome HOME
0023505: Sigsegv with fuse on cylinder and cone
[modules/geom.git] / src / STLPlugin / STLPlugin_IOperations.cxx
index 512b9251b43aa8d9ba05e7dcd362129af258453e..20337539d20dc1339a7c756ac030e2bb4dbd8554 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2014-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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;
   }