gears.surface: add a traceback for "Failed to load" errors

This is useful to see where the error is coming from.
This commit is contained in:
Daniel Hahler 2016-05-11 21:50:02 +02:00
parent c1d9e58f94
commit c25c0527a6
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ local function do_load_and_handle_errors(_surface, func)
if result then
return result
end
gdebug.print_error("Failed to load '" .. tostring(_surface) .. "': " .. tostring(err))
gdebug.print_error(debug.traceback(
"Failed to load '" .. tostring(_surface) .. "': " .. tostring(err)))
return get_default()
end