--- trunk/src/mdParser/SimplePreprocessor.hpp 2006/03/22 20:57:09 911 +++ trunk/src/mdParser/SimplePreprocessor.hpp 2006/03/23 14:59:14 912 @@ -44,8 +44,11 @@ #include #include #include +#include #include "utils/StringTokenizer.hpp" #include "utils/Trim.hpp" +#include "utils/OOPSEException.hpp" + /** * @class SimplePreprocessor * @brief A simple preprocessor. @@ -66,7 +69,11 @@ class SimplePreprocessor { private: bool doPreprocess(const std::string& filename, ostream& os, std::set& defineSet, std::stack& ifStates) { std::ifstream input(filename.c_str()); - + if (!input.is_open()) { + std::stringstream ss; + ss << "Can not open " << filename << " for preprocessing\n"; + throw OOPSEException(ss.str()); + } int lineNo =1; os << "#line " << lineNo << " \"" << filename << "\"\n"; while(input.getline(buffer, bufferSize)) {