Micro AIs: improve error reporting
Use error() instead of wesnoth.message(), as this also produces a stack traceback.
This commit is contained in:
parent
947cbb2a45
commit
b7bc394f95
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue