3
*************************************************************************
5
ArmageTron -- Just another Tron Lightcycle Game in 3D.
6
Copyright (C) 2005 by Manuel Moos (z-man@users.sf.net)
7
and the AA DevTeam (see the file AUTHORS(.txt) in the main source directory)
9
**************************************************************************
11
This program is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License
13
as published by the Free Software Foundation; either version 2
14
of the License, or (at your option) any later version.
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, write to the Free Software
23
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
***************************************************************************
29
#ifndef ArmageTron_tEXCEPTION_H
30
#define ArmageTron_tEXCEPTION_H
34
//! Base class for all exceptions
38
tString GetName() const; //!< returns the name of the exception
39
tString GetDescription() const; //!< returns a detailed description
42
virtual ~tException(); //!< destructor
45
virtual tString DoGetName() const = 0; //!< returns the name of the exception
46
virtual tString DoGetDescription() const; //!< returns a detailed description
49
//! Simple, generic exception class for locally fatal errors (that abort a function,
50
// but not the program)
51
class tGenericException: public tException
54
virtual ~tGenericException(); //!< destructor
55
tGenericException( char const * description, char const * name = NULL ); //!< constructor from description and name
57
virtual tString DoGetName() const; //!< returns the name of the exception
58
virtual tString DoGetDescription() const; //!< returns a detailed description
60
tString description_; //!< exception description
61
tString name_; //!< exception name