00001 /* 00002 00003 ************************************************************************* 00004 00005 ArmageTron -- Just another Tron Lightcycle Game in 3D. 00006 Copyright (C) 2005 by Manuel Moos (z-man@users.sf.net) 00007 and the AA DevTeam (see the file AUTHORS(.txt) in the main source directory) 00008 00009 ************************************************************************** 00010 00011 This program is free software; you can redistribute it and/or 00012 modify it under the terms of the GNU General Public License 00013 as published by the Free Software Foundation; either version 2 00014 of the License, or (at your option) any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software 00023 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00024 00025 *************************************************************************** 00026 00027 */ 00028 00029 #ifndef ArmageTron_tEXCEPTION_H 00030 #define ArmageTron_tEXCEPTION_H 00031 00032 #include "tString.h" 00033 00035 class tException 00036 { 00037 public: 00038 tString GetName() const; 00039 tString GetDescription() const; 00040 00041 protected: 00042 virtual ~tException(); 00043 00044 private: 00045 virtual tString DoGetName() const = 0; 00046 virtual tString DoGetDescription() const; 00047 }; 00048 00050 // but not the program) 00051 class tGenericException: public tException 00052 { 00053 public: 00054 virtual ~tGenericException(); 00055 tGenericException( char const * description, char const * name = NULL ); 00056 private: 00057 virtual tString DoGetName() const; 00058 virtual tString DoGetDescription() const; 00059 00060 tString description_; 00061 tString name_; 00062 }; 00063 00064 #endif