28 #include "WMeshReaderInterface.h"
37 return getLine( *( ifs ), desc );
47 std::getline( ifs, line,
'\n' );
49 catch(
const std::ios_base::failure &e )
51 throw WDHIOFailure( std::string(
"IO error while " + desc +
" of mesh file: , " + e.what() ) );
55 throw WDHParseError( std::string(
"Unexpected end of mesh file." ) );
Use this for IO error handling.
Use this for IO error handling.
virtual ~WMeshReaderInterface()
Destructor.
std::string getLine(std::shared_ptr< std::ifstream > ifs, const std::string &desc) const
Read a line from the given input stream and throw an exception on error.