X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FcpPluginsIO%2FMeshWriter.cxx;h=699d3822858d503150c65976deede45559d7277a;hb=e2fb8817731f6231d34941a208e46b36dad425b2;hp=ad5501ac0e091e4ffb062c1471df67110bc7a005;hpb=eccc88f770fd53f8ef8d578127a8788315573c52;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$