3 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef EXCEPTIONS_HEADER
21 #define EXCEPTIONS_HEADER
25 class BaseException : public std::exception
28 BaseException(const char *s)
32 virtual const char * what() const throw()
39 class AsyncQueuedException : public BaseException
42 AsyncQueuedException(const char *s):
47 class NotImplementedException : public BaseException
50 NotImplementedException(const char *s):
55 class AlreadyExistsException : public BaseException
58 AlreadyExistsException(const char *s):
63 class VersionMismatchException : public BaseException
66 VersionMismatchException(const char *s):
71 class FileNotGoodException : public BaseException
74 FileNotGoodException(const char *s):
79 class SerializationError : public BaseException
82 SerializationError(const char *s):
87 class LoadError : public BaseException
90 LoadError(const char *s):
95 class ContainerFullException : public BaseException
98 ContainerFullException(const char *s):
103 class SettingNotFoundException : public BaseException
106 SettingNotFoundException(const char *s):
111 class InvalidFilenameException : public BaseException
114 InvalidFilenameException(const char *s):
119 class ProcessingLimitException : public BaseException
122 ProcessingLimitException(const char *s):
128 Some "old-style" interrupts:
131 class InvalidPositionException : public BaseException
134 InvalidPositionException():
135 BaseException("Somebody tried to get/set something in a nonexistent position.")
137 InvalidPositionException(const char *s):
142 class TargetInexistentException : public std::exception
144 virtual const char * what() const throw()
146 return "Somebody tried to refer to something that doesn't exist.";
150 class NullPointerException : public std::exception
152 virtual const char * what() const throw()
154 return "NullPointerException";