X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/git-logo.png?a=blobdiff_plain;ds=sidebyside;f=new2%2Fplomrogue%2Fio.py;h=2c048f03b4b1b70fb47356af8cb5ecdc4e1b9c93;hb=c2732dbd6d4a149388c2deec9b9d2dc6b9c81d69;hp=9f34b180f851793b04ce02e32c52b46ea9c68481;hpb=f7f11798a90187ab83d038f737368317a99e15b0;p=plomrogue2-experiments diff --git a/new2/plomrogue/io.py b/new2/plomrogue/io.py index 9f34b18..2c048f0 100644 --- a/new2/plomrogue/io.py +++ b/new2/plomrogue/io.py @@ -53,9 +53,10 @@ class GameIO(): """ from inspect import signature - from plomrogue.errors import GameError, ArgError + from plomrogue.errors import GameError, ArgError, PlayError from plomrogue.misc import quote + print('DEBUG', input_); def answer(connection_id, msg): if connection_id: self.send(msg, connection_id) @@ -76,6 +77,8 @@ class GameIO(): # f.write(input_ + '\n') except ArgError as e: answer(connection_id, 'ARGUMENT_ERROR ' + quote(str(e))) + except PlayError as e: + answer(connection_id, 'PLAY_ERROR ' + quote(str(e))) except GameError as e: answer(connection_id, 'GAME_ERROR ' + quote(str(e)))