Source-highlight Library
highlightbuilderexception.h
1 //
2 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3 //
4 // Copyright: See COPYING file that comes with this distribution
5 //
6 
7 #ifndef HIGHLIGHTBUILDEREXCEPTION_H_
8 #define HIGHLIGHTBUILDEREXCEPTION_H_
9 
10 #include <ostream>
11 #include <boost/regex/pattern_except.hpp>
12 #include <string>
13 
14 namespace srchilite {
15 
16 struct ParserInfo;
17 
18 struct HighlightBuilderException : public std::exception {
20  std::string message;
21 
23  boost::regex_error causedBy;
24 
26  std::string filename;
27 
29  unsigned int line;
30 
31  HighlightBuilderException(const std::string &_message,
32  const ParserInfo *parserinfo,
33  const boost::regex_error &e = boost::regex_error(boost::regex_constants::error_bad_pattern));
34  HighlightBuilderException(const std::string &_message,
35  const std::string &filename = "", unsigned int line = 0,
36  const boost::regex_error &e = boost::regex_error(boost::regex_constants::error_bad_pattern));
37  virtual ~HighlightBuilderException() throw();
38 
39  virtual const char* what ( ) const throw () ;
40 };
41 
42 std::ostream& operator<<(std::ostream& os, const HighlightBuilderException &entry);
43 
44 }
45 
46 #endif /*HIGHLIGHTBUILDEREXCEPTION_H_*/
std::string filename
filename of the element that caused this exception
Definition: highlightbuilderexception.h:26
STL namespace.
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
std::string message
detailed message for this exception
Definition: highlightbuilderexception.h:20
Stores information about the file name and the line number of a generic element created during parsin...
Definition: parserinfo.h:23
unsigned int line
line of the element that caused this exception
Definition: highlightbuilderexception.h:29
Definition: highlightbuilderexception.h:18
boost::regex_error causedBy
possible exception that caused this one
Definition: highlightbuilderexception.h:23