Source-highlight Library
/home/bettini/work/source-highlight/src-highlite/lib/srchilite/parserexception.h
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 PARSEREXCEPTION_H_
00008 #define PARSEREXCEPTION_H_
00009 
00010 #include <ostream>
00011 #include <string>
00012 #include <exception>
00013 
00014 namespace srchilite {
00015 
00016 struct ParseStruct;
00017 
00022 struct ParserException : public std::exception {
00024     std::string message;
00025 
00027     std::string additional;
00028 
00030     std::string filename;
00031 
00033     unsigned int line;
00034 
00035     ParserException(const std::string &_message,
00036             const ParseStruct *parserinfo);
00037     ParserException(const std::string &_message,
00038             const std::string &filename = "", unsigned int line = 0);
00039     virtual ~ParserException() throw ();
00040 
00041     virtual const char* what ( ) const throw ();
00042 };
00043 
00044 std::ostream& operator<<(std::ostream& os, const ParserException &entry);
00045 
00046 }
00047 
00048 #endif /*PARSEREXCEPTION_H_*/