lemon/lemon_reader.h
changeset 1809 029cc4f638d1
parent 1722 2acb5f9bfa72
child 1845 f8bbfed86036
equal deleted inserted replaced
7:372cac544ec8 8:a7e529c07088
   407     ///
   407     ///
   408     /// Constructor for LemonReader which reads from the given file.
   408     /// Constructor for LemonReader which reads from the given file.
   409     LemonReader(const std::string& filename) 
   409     LemonReader(const std::string& filename) 
   410       : is(0), own_is(true) {
   410       : is(0), own_is(true) {
   411       is = new std::ifstream(filename.c_str());
   411       is = new std::ifstream(filename.c_str());
       
   412       if (is->fail()) {
       
   413 	throw FileOpenError(filename);
       
   414       }
   412     }
   415     }
   413 
   416 
   414     /// \brief Desctructor for LemonReader.
   417     /// \brief Desctructor for LemonReader.
   415     ///
   418     ///
   416     /// Desctructor for LemonReader.
   419     /// Desctructor for LemonReader.