mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 07:45:28 +00:00
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
@ -130,7 +130,7 @@ end
|
|||||||
|
|
||||||
function ai_helper.checked_action_error(action, error_code)
|
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', '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
|
end
|
||||||
|
|
||||||
function ai_helper.checked_attack(ai, attacker, defender, weapon)
|
function ai_helper.checked_attack(ai, attacker, defender, weapon)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user