From c25c0527a61de21963aa4bfa44135995be2dbbf9 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 11 May 2016 21:50:02 +0200 Subject: [PATCH] gears.surface: add a traceback for "Failed to load" errors This is useful to see where the error is coming from. --- lib/gears/surface.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gears/surface.lua b/lib/gears/surface.lua index 3cb18565..1c4800e6 100644 --- a/lib/gears/surface.lua +++ b/lib/gears/surface.lua @@ -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