Added check if write succeeded.

This commit is contained in:
mkazhdan
2018-10-30 11:09:34 -04:00
parent 44ba73aced
commit 830de154b2
6 changed files with 11 additions and 6 deletions
+2 -1
View File
@@ -359,7 +359,8 @@ void ExtractMesh( UIntPack< FEMSigs ... > , std::tuple< SampleData ... > , FEMTr
else profiler.dumpOutput2( comments , "# Got triangles:" );
std::vector< std::string > noComments;
PlyWritePolygons< Vertex , Real , Dim >( Out.value , &mesh , ASCII.set ? PLY_ASCII : PLY_BINARY_NATIVE , NoComments.set ? noComments : comments , iXForm );
if( !PlyWritePolygons< Vertex , Real , Dim >( Out.value , &mesh , ASCII.set ? PLY_ASCII : PLY_BINARY_NATIVE , NoComments.set ? noComments : comments , iXForm ) )
fprintf( stderr , "[ERROR] Could not write mesh to: %s\n" , Out.value ) , exit( 0 );
}
template< class Real , typename ... SampleData , unsigned int ... FEMSigs >