# This file is part of jwmud, written by Helmut Pozimski in 2014. # # jwmud is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 2 of the License. # # jwmud is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with jwmud. If not, see . # -*- coding: utf8 -*- class DataBaseAccessFailed(Exception): def __init__(self): self.__message = "Accessing the database failed!" def __str__(self): return self.__message class DataBaseWriteFailed(Exception): def __init__(self): self.__message = "Writing to the database failed, requested action " \ "aborted !" def __str__(self): return self.__message class WrongParameters(Exception): def __init__(self): self.__message = "The wrong number or values of parameters where " \ "given to the function, the requested action failed." def __str__(self): return self.__message class CategoryNotFound(Exception): def __init__(self): self.__message = "The category could not be found in the database." def __str__(self): return self.__message class DayAlreadyInDatabase(Exception): def __init__(self): self.__message = "This day already exists in the database." def __str__(self): return self.__message