Page 1 of 1

improved error message

Posted: 04 April 2013, 03:16
by ddyer
"This game action is impossible right now".

Presumably this comes from "checkaction" and it would be trivial to mention the action name
and perhaps the current game state.

Re: improved error message

Posted: 04 April 2013, 20:17
by ddyer
likewise for "Unexpected error: Not a player action"

Re: improved error message

Posted: 22 July 2013, 10:43
by Een
Hi,

Taking a look at this (finally). in fact, this message is not meant for debugging as it can be presented to the user. That's why it's generic, as action and state name are developper stuff that shouldn't show on the surface.
There is currently already a message in the log with all the information needed for debugging purposes :

Code: Select all

self::trace( "Game action impossible: ".$action_name." for state ".$state['name'] );
As for the second error, I couldn't find it in the source, so it must have been rewritten already.

Cheers,
Een