aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/utils/exceptions.py
diff options
context:
space:
mode:
authornotoraptor <stevenbocco@gmail.com>2018-10-25 11:20:56 -0400
committernotoraptor <stevenbocco@gmail.com>2019-04-18 11:17:43 -0400
commitb609e150b811700f3a429f0dd653b96f1be511d9 (patch)
treea4bde13c445aa697a0d6d9ffa8a68ddb24d88f5a /diplomacy/utils/exceptions.py
parentbd854ba28d37d426a1822e97baf8dc8f8b44b993 (diff)
Map - Modified norm() and compact()
- Added 'loc' arg to get_order_status - Raising exception on set_orders for invalid power - Deprecated game.distribute_orders
Diffstat (limited to 'diplomacy/utils/exceptions.py')
-rw-r--r--diplomacy/utils/exceptions.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/diplomacy/utils/exceptions.py b/diplomacy/utils/exceptions.py
index 4d564a3..5cf4384 100644
--- a/diplomacy/utils/exceptions.py
+++ b/diplomacy/utils/exceptions.py
@@ -101,6 +101,9 @@ class GameIdException(ResponseException):
class GameJoinRoleException(ResponseException):
""" A token can have only one role inside a game: player, observer or omniscient. """
+class GameRoleException(ResponseException):
+ """ Game role does not accepts this action. """
+
class GameMasterTokenException(ResponseException):
""" Invalid token for master operations. """
@@ -145,17 +148,11 @@ class MapPowerException(ResponseException):
def __init__(self, power_name):
super(MapPowerException, self).__init__('Invalid map power %s' % power_name)
-class ServerDataDirException(ResponseException):
- """ No data directory available in server folder. """
-
class FolderException(ResponseException):
""" Given folder not available in server. """
def __init__(self, folder_path):
super(FolderException, self).__init__('Given folder not available in server: %s' % folder_path)
-class ServerGameDirException(ResponseException):
- """ No games directory available in server/data folder. """
-
class ServerRegistrationException(ResponseException):
""" Registration currently not allowed on this server. """
@@ -168,9 +165,6 @@ class UserException(ResponseException):
class PasswordException(ResponseException):
""" Password must not be empty. """
-class VoteCreationException(ResponseException):
- """ Only either a player or a game master for a game with at least 1 player can create a vote. """
-
class ServerDirException(ResponseException):
""" Error with working folder. """