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:
parent
3a160c9363
commit
a6718a4a0d
|
@ -83,6 +83,7 @@ function imagebox:set_image(image)
|
||||||
local success, result = pcall(surface.load, image)
|
local success, result = pcall(surface.load, image)
|
||||||
if not success then
|
if not success then
|
||||||
print("Error while reading '" .. image .. "': " .. result)
|
print("Error while reading '" .. image .. "': " .. result)
|
||||||
|
print(debug.traceback())
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
image = result
|
image = result
|
||||||
|
|
Loading…
Reference in New Issue