--- trunk/src/mdParser/SimplePreprocessor.hpp 2006/03/23 14:59:14 912 +++ trunk/src/mdParser/SimplePreprocessor.hpp 2006/04/17 21:49:12 938 @@ -48,12 +48,14 @@ #include "utils/StringTokenizer.hpp" #include "utils/Trim.hpp" #include "utils/OOPSEException.hpp" +#include "utils/simError.h" + /** * @class SimplePreprocessor * @brief A simple preprocessor. - * @note only support #include #ifdef, #ifndef, #endif, #define and #undef, c-like multiple line - * comment is not support, macro substitude is not support. + * @note only supports #include #ifdef, #ifndef, #endif, #define and #undef, c-like multiple line + * comment is not supported, macro substitute is not supported. */ namespace oopse { class SimplePreprocessor { @@ -72,6 +74,14 @@ class SimplePreprocessor { if (!input.is_open()) { std::stringstream ss; ss << "Can not open " << filename << " for preprocessing\n"; + + sprintf(painCave.errMsg, + "Can not open (%s) for processing. \n" + "\tPlease check md file name syntax.\n", filename.c_str()); + + painCave.isFatal = 1; + simError(); + throw OOPSEException(ss.str()); } int lineNo =1; @@ -125,7 +135,7 @@ class SimplePreprocessor { } os << std::endl; } else { - std::cout << tokens[0] << " is not support" << std::endl; + std::cout << tokens[0] << " is not supported (yet)." << std::endl; return false; } }else {