Source-highlight Library
|
00001 // 00002 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 00003 // 00004 // Copyright: See COPYING file that comes with this distribution 00005 // 00006 00007 #ifndef HIGHLIGHTBUILDEREXCEPTION_H_ 00008 #define HIGHLIGHTBUILDEREXCEPTION_H_ 00009 00010 #include <ostream> 00011 #include <boost/regex/pattern_except.hpp> 00012 #include <string> 00013 00014 namespace srchilite { 00015 00016 struct ParserInfo; 00017 00018 struct HighlightBuilderException : public std::exception { 00020 std::string message; 00021 00023 boost::regex_error causedBy; 00024 00026 std::string filename; 00027 00029 unsigned int line; 00030 00031 HighlightBuilderException(const std::string &_message, 00032 const ParserInfo *parserinfo, 00033 const boost::regex_error &e = boost::regex_error(boost::regex_constants::error_bad_pattern)); 00034 HighlightBuilderException(const std::string &_message, 00035 const std::string &filename = "", unsigned int line = 0, 00036 const boost::regex_error &e = boost::regex_error(boost::regex_constants::error_bad_pattern)); 00037 virtual ~HighlightBuilderException() throw(); 00038 00039 virtual const char* what ( ) const throw () ; 00040 }; 00041 00042 std::ostream& operator<<(std::ostream& os, const HighlightBuilderException &entry); 00043 00044 } 00045 00046 #endif /*HIGHLIGHTBUILDEREXCEPTION_H_*/