Hosting courtesy of Sourceforge

SourceForge Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

GeneralException.h

Go to the documentation of this file.
00001 //
00002 //      Copyright (C) 2002 Robert Renaud
00003 //
00004 //      This program is free software; you can redistribute it and/or
00005 //      modify it under the terms of the GNU General Public License
00006 //      as published by the Free Software Foundation; either version 2
00007 //      of the License, or (at your option) any later version.
00008 //
00009 //      This program is distributed in the hope that it will be useful,
00010 //      but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 //      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 //
00013 //      See the GNU General Public License for more details.
00014 //
00015 //      You should have received a copy of the GNU General Public License
00016 //      along with this program; if not, write to the Free Software
00017 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 //
00019 
00020 #ifndef GENERAL_EXCEPTION_H_
00021 #define GENERAL_EXCEPTION_H_
00022 
00023 #include "../Config.h"
00024 #include "StringUtil.h"
00025 
00026 #include <string>
00027 #include <fstream> // need to find out what header ostream is in
00028 
00029 namespace Util {
00035         class GeneralException {
00036         public:
00043                 GeneralException(const std::string &error ="", const std::string file ="",size_t lineNumber=0);
00044 
00047                 virtual std::string getError() const;
00048 
00049                 virtual ~GeneralException() { }
00050         protected:
00051                 std::string errorMsg;
00052                 std::string fileName;
00053                 size_t lineNum;
00054         };
00055 };
00056 
00058 std::ostream& operator << (std::ostream& stream, const Util::GeneralException& e);
00059 
00060 #endif // ifdef GENERAL_EXCEPTION_H_
00061 

Generated on Tue May 21 07:26:51 2002 for BomberLAN by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001