jwmu_exceptions.py 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. # This file is part of jwmud, written by Helmut Pozimski in 2014.
  2. #
  3. # jwmud is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, version 2 of the License.
  6. #
  7. # jwmud is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. #
  12. # You should have received a copy of the GNU General Public License
  13. # along with jwmud. If not, see <http://www.gnu.org/licenses/>.
  14. # -*- coding: utf8 -*-
  15. class DataBaseAccessFailed(Exception):
  16. def __init__(self):
  17. self.__message = "Accessing the database failed!"
  18. def __str__(self):
  19. return self.__message
  20. class DataBaseWriteFailed(Exception):
  21. def __init__(self):
  22. self.__message = "Writing to the database failed, requested action " \
  23. "aborted !"
  24. def __str__(self):
  25. return self.__message