Micro AIs: improve error reporting

Use error() instead of wesnoth.message(), as this also produces a stack
traceback.
This commit is contained in:
mattsc 2014-02-27 16:16:36 -08:00
parent 947cbb2a45
commit b7bc394f95

View file

@ -130,7 +130,7 @@ end
function ai_helper.checked_action_error(action, error_code)
wesnoth.message('Lua AI error', 'If you see this message, something has gone wrong. Please report this on the Wesnoth forums, ideally with a replay and/or savegame.')
wesnoth.message('Lua AI error', action .. ' could not be executed. Error code: ' .. error_code)
error(action .. ' could not be executed. Error code: ' .. error_code)
end
function ai_helper.checked_attack(ai, attacker, defender, weapon)