From: vsr Date: Thu, 16 Nov 2017 11:37:24 +0000 (+0300) Subject: Switch to standard C++ exception mechanism X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4ad66774bc88a105e441a9c523ed2bd9d11373ed;p=plugins%2Fdxfplugin.git Switch to standard C++ exception mechanism --- diff --git a/src/DXFPlugin_IOperations.cxx b/src/DXFPlugin_IOperations.cxx index 52986e7..42c014b 100644 --- a/src/DXFPlugin_IOperations.cxx +++ b/src/DXFPlugin_IOperations.cxx @@ -94,9 +94,8 @@ void DXFPlugin_IOperations::ExportDXF( 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; } @@ -150,9 +149,8 @@ DXFPlugin_IOperations::ImportDXF( 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; }