2 // Copyright (C) 2007 by Martin Moracek
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * This file contains custom exception interface
24 * Contains declaration of the Exception class, derived from std::exception.
35 * Custom exception class. Used for every non-standard exception.
37 class Exception
: public std::exception
{
39 /** Gets description of the thrown exception. */
40 virtual const char * what() const throw()
42 return whatString
.c_str();
45 /** Copy constructor. */
46 Exception(const std::string
& str
)
51 virtual ~Exception() throw()
56 /** String briefly describing the cause of the exception. */
57 std::string whatString
;