X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FcpPluginsIO%2FMeshWriter.cxx;fp=plugins%2FcpPluginsIO%2FMeshWriter.cxx;h=699d3822858d503150c65976deede45559d7277a;hb=bebef39d45df113f3a706279a395eba44ce9472c;hp=ad5501ac0e091e4ffb062c1471df67110bc7a005;hpb=22cb3969b7d62fffa30a106eaf9a5f7c7a2dabf4;p=cpPlugins.git diff --git a/plugins/cpPluginsIO/MeshWriter.cxx b/plugins/cpPluginsIO/MeshWriter.cxx index ad5501a..699d382 100644 --- a/plugins/cpPluginsIO/MeshWriter.cxx +++ b/plugins/cpPluginsIO/MeshWriter.cxx @@ -27,12 +27,12 @@ cpPluginsIO::MeshWriter:: } // ------------------------------------------------------------------------- -std::string cpPluginsIO::MeshWriter:: +void cpPluginsIO::MeshWriter:: _GenerateData( ) { auto mesh = this->GetInputData( "Input" )->GetVTK< vtkPolyData >( ); if( mesh == NULL ) - return( "MeshWriter: No suitable input." ); + this->_Error( "No suitable input." ); // Get file extension auto fname = this->m_Parameters.GetSaveFileName( "FileName" ); @@ -50,9 +50,7 @@ _GenerateData( ) stlw->SetFileName( fname.c_str( ) ); stlw->Update( ); if( stlw->GetErrorCode( ) != 0 ) - return( "MeshWriter: someting wrong happened." ); - else - return( "" ); + this->_Error( "Someting wrong happened." ); } else if( ext == "vtk" ) { @@ -61,12 +59,10 @@ _GenerateData( ) pdw->SetFileName( fname.c_str( ) ); pdw->Update( ); if( pdw->GetErrorCode( ) != 0 ) - return( "MeshWriter: someting wrong happened." ); - else - return( "" ); + this->_Error( "Someting wrong happened." ); } else - return( "MeshWriter: Input file format not recognized." ); + this->_Error( "Input file format not recognized." ); } // eof - $RCSfile$