3 Copyright (C) 2013 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 Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser 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):
127 class CommandLineError : public BaseException
130 CommandLineError(const char *s):
135 class ItemNotFoundException : public BaseException
138 ItemNotFoundException(const char *s):
144 Some "old-style" interrupts:
147 class InvalidPositionException : public BaseException
150 InvalidPositionException():
151 BaseException("Somebody tried to get/set something in a nonexistent position.")
153 InvalidPositionException(const char *s):
158 class TargetInexistentException : public std::exception
160 virtual const char * what() const throw()
162 return "Somebody tried to refer to something that doesn't exist.";
166 class NullPointerException : public std::exception
168 virtual const char * what() const throw()
170 return "NullPointerException";