Print debug.traceback() with imagebox:set_image, when reading image failed

This made it easier to figure out where a file causing an error was
coming from, but I could imagine that this could become too noisy, and
that there is/should probably be a more streamlined way to enable more
verbose logging / error output.
This commit is contained in:
Daniel Hahler 2015-02-09 20:20:18 +01:00
parent 3a160c9363
commit a6718a4a0d
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ function imagebox:set_image(image)
local success, result = pcall(surface.load, image)
if not success then
print("Error while reading '" .. image .. "': " .. result)
print(debug.traceback())
return false
end
image = result