- err.reset ( new SMESH_ComputeError( COMPERR_ALGO_FAILED,
- "Inverted elements generated"));
- err->myBadElements.swap( badFaces );
+ SMESH_BadInputElements* badElems =
+ new SMESH_BadInputElements( meshDS, COMPERR_ALGO_FAILED,
+ "Inverted elements generated");
+ badElems->myBadElements.swap( badFaces );
+ err.reset( badElems );