2018-05-26 15:07:17 +00:00
|
|
|
class DataBaseError(Exception):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Base class for exceptions in this module."""
|
2018-05-26 15:07:17 +00:00
|
|
|
pass
|
|
|
|
|
2018-08-11 23:02:50 +00:00
|
|
|
|
2018-05-26 15:07:17 +00:00
|
|
|
class LocationInitError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Error in initializing Location"""
|
|
|
|
|
2018-05-26 15:07:17 +00:00
|
|
|
|
2018-07-20 01:18:22 +00:00
|
|
|
class TunnelInitError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Error in initializing Tunnel"""
|
|
|
|
|
2018-07-20 01:18:22 +00:00
|
|
|
|
2018-07-29 13:59:11 +00:00
|
|
|
class NoMatchFoundError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""No matches were found in the database"""
|
|
|
|
|
2018-05-26 15:07:17 +00:00
|
|
|
|
2018-07-15 15:56:56 +00:00
|
|
|
class LocationLookUpError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Error in finding location in database"""
|
|
|
|
|
2018-05-29 14:04:01 +00:00
|
|
|
|
2018-07-15 15:56:56 +00:00
|
|
|
class DeleteEntryError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Error in deleting entry"""
|
|
|
|
|
2018-06-03 02:42:31 +00:00
|
|
|
|
|
|
|
class UsernameLookupFailed(Exception):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Error in username lookup, is the player's nickname set correctly? *stares at aeskdar*"""
|
|
|
|
|
2018-06-03 02:42:31 +00:00
|
|
|
|
2018-06-30 15:07:56 +00:00
|
|
|
class PlayerNotFound(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Player not found in database."""
|
|
|
|
|
2018-06-30 15:07:56 +00:00
|
|
|
|
2018-07-21 01:50:24 +00:00
|
|
|
class EntryNameNotUniqueError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""A location by that name is already in the database."""
|
|
|
|
|
2018-07-15 15:56:56 +00:00
|
|
|
|
2018-07-21 18:28:31 +00:00
|
|
|
class StringTooLong(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""Given string is too long."""
|
|
|
|
|
2018-07-21 18:28:31 +00:00
|
|
|
|
2018-07-22 23:56:07 +00:00
|
|
|
class DatabaseValueError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""'String too long or number too large"""
|
|
|
|
|
2018-07-22 23:56:07 +00:00
|
|
|
|
|
|
|
class ItemNotFound(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""No item matches found in database"""
|
|
|
|
|
2018-07-22 23:56:07 +00:00
|
|
|
|
2018-07-23 00:26:21 +00:00
|
|
|
class InvalidDimError(DataBaseError):
|
|
|
|
"""Invalid dimension name"""
|
|
|
|
|
2018-08-11 23:02:50 +00:00
|
|
|
|
2018-07-23 00:26:21 +00:00
|
|
|
class InvalidTunnelError(DataBaseError):
|
|
|
|
"""Invalid tunnel name"""
|
|
|
|
|
2018-08-11 23:02:50 +00:00
|
|
|
|
2018-08-05 22:20:37 +00:00
|
|
|
class PlayerInDBError(DataBaseError):
|
2018-07-23 01:37:06 +00:00
|
|
|
"""Player already registered in database"""
|
2018-07-21 18:28:31 +00:00
|
|
|
|
2018-08-11 23:02:50 +00:00
|
|
|
|
2018-07-29 13:59:11 +00:00
|
|
|
class LocationHasTunnelError(DataBaseError):
|
|
|
|
"""That location already has a tunnel"""
|
|
|
|
|
2018-08-11 23:02:50 +00:00
|
|
|
|
2018-08-05 22:20:37 +00:00
|
|
|
class NoPermissionError(DataBaseError):
|
|
|
|
"""You have no permission to run this command"""
|
|
|
|
|
2018-08-11 23:02:50 +00:00
|
|
|
|
2018-08-05 22:20:37 +00:00
|
|
|
class NotOnServerError(DataBaseError):
|
2018-08-11 23:02:50 +00:00
|
|
|
"""You need to run this command on 24CC"""
|
|
|
|
|
2018-06-30 15:07:56 +00:00
|
|
|
|
2018-09-13 16:25:40 +00:00
|
|
|
class NoLocationsInDatabase(DataBaseError):
|
|
|
|
"""This player has no locations in the database"""
|
|
|
|
|
|
|
|
|
2018-08-11 16:20:40 +00:00
|
|
|
class FuckyWucky:
|
2018-08-11 23:02:50 +00:00
|
|
|
"""You made one."""
|