Geoffrey-Django/BotErrors.py

76 lines
1.7 KiB
Python
Raw Normal View History

class DataBaseError(Exception):
"""Base class for exceptions in this module."""
pass
class LocationInitError(DataBaseError):
"""Error in initializing Location"""
class TunnelInitError(DataBaseError):
"""Error in initializing Tunnel"""
class NoMatchFoundError(DataBaseError):
"""No matches were found in the database"""
class LocationLookUpError(DataBaseError):
"""Error in finding location in database"""
class DeleteEntryError(DataBaseError):
"""Error in deleting entry"""
2018-06-03 02:42:31 +00:00
class UsernameLookupFailed(Exception):
"""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):
"""Player not found in database."""
2018-06-30 15:07:56 +00:00
class EntryNameNotUniqueError(DataBaseError):
"""A location by that name is already in the database."""
2018-07-21 18:28:31 +00:00
class StringTooLong(DataBaseError):
"""Given string is too long."""
2018-07-21 18:28:31 +00:00
class DatabaseValueError(DataBaseError):
"""'String too long or number too large"""
class ItemNotFound(DataBaseError):
"""No item matches found in database"""
class InvalidDimError(DataBaseError):
"""Invalid dimension name"""
class InvalidTunnelError(DataBaseError):
"""Invalid tunnel name"""
class PlayerInDBError(DataBaseError):
"""Player already registered in database"""
2018-07-21 18:28:31 +00:00
class LocationHasTunnelError(DataBaseError):
"""That location already has a tunnel"""
class NoPermissionError(DataBaseError):
"""You have no permission to run this command"""
class NotOnServerError(DataBaseError):
"""You need to run this command on 24CC"""
2018-06-30 15:07:56 +00:00
class FuckyWucky:
"""You made one."""